Function at 0x4016a0
Capabilities:
Delete file
Download url
Receive data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4263dc
mov eax, dword fs:[0]
push eax
sub esp, 0x25c
mov eax, dword [0x434020]
xor eax, esp
mov dword [esp + 0x254], eax
push ebx
push edi
mov eax, dword [0x434020]
xor eax, esp
push eax
lea eax, [esp + 0x268]
mov dword fs:[0], eax
mov eax, dword [esi + 0x34]
mov ecx, dword [esi + 0x30]
push 0xffffffffffffffff
push 0
lea edx, [esp + 0x20]
push edx
push 2
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
je 0x40192b
lea ecx, [esp + 0x38]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
xor edi, edi
push esi
mov dword [esp + 0x274], 0
mov dword [esp + 0x10], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi + 0x2c], edi
jne 0x40173c
mov eax, dword [esi + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
jmp 0x401837
mov eax, dword [esi + 0x28]
mov ebx, dword [eax]
cmp ebx, eax
jne 0x40174b
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
add ebx, 8
push ebx
lea ecx, [esp + 0x3c]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov eax, dword [esi + 0x28]
mov ebx, dword [eax]
cmp ebx, eax
jne 0x401768
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp ebx, dword [esi + 0x28]
je 0x401792
mov eax, dword [ebx + 4]
mov ecx, dword [ebx]
mov dword [eax], ecx
mov edx, dword [ebx]
mov eax, dword [ebx + 4]
lea ecx, [ebx + 8]
mov dword [edx + 4], eax
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
push ebx
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
add esp, 4
add dword [esi + 0x2c], 0xffffffff
lea ecx, [esp + 0x38]
lea ebx, [esi + 0x18]
push ecx
mov eax, ebx
call fcn.004021e0
test ebx, ebx
mov edi, eax
mov dword [esp + 0x24], edi
jne 0x4017b1
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp edi, dword [ebx + 4]
mov dword [esp + 0x20], ebx
je 0x4017d6
add edi, 0xc
lea edx, [esp + 0x38]
push edi
push edx
call dword [sym.imp.MSVCP80.dll_bool___cdecl_std::operator__wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const___class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
add esp, 8
test al, al
jne 0x4017d6
lea eax, [esp + 0x20]
jmp 0x4017e5
mov eax, dword [ebx + 4]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], ebx
lea eax, [esp + 0x28]
mov edi, dword [eax]
test edi, edi
mov ecx, dword [eax + 4]
mov edx, dword [ebx + 4]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x34], edx
je 0x4017fd
cmp edi, ebx
je 0x401807
mov ebx, dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
call ebx
jmp 0x40180d
mov ebx, dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov eax, dword [esp + 0x34]
cmp dword [esp + 0x14], eax
je 0x401833
test edi, edi
jne 0x40181d
call ebx
mov ecx, dword [esp + 0x14]
cmp ecx, dword [edi + 4]
jne 0x401828
call ebx
mov edx, dword [esp + 0x14]
mov eax, dword [edx + 0x28]
mov edi, eax
jmp 0x401837
mov edi, dword [esp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [esp + 0x4c], 0
je 0x4018d9
test edi, edi
jne 0x4018dd
cmp dword [esp + 0x50], 8
mov eax, dword [esp + 0x3c]
jae 0x401860
lea eax, [esp + 0x3c]
push 0
push 0
push 0x104
lea ecx, [esp + 0x60]
push ecx
push eax
push 0
call sub.urlmon.dll_URLDownloadToCacheFileW
test eax, eax
jne 0x4018ae
push 0x10
call sub.gdiplus.dll_GdipAlloc
mov ebx, eax
test ebx, ebx
je 0x4018a6
lea eax, [ebx + 4]
push eax
lea edx, [esp + 0x58]
push edx
mov dword [ebx], vtable.Gdiplus::Image.0
mov dword [eax], 0
call sub.gdiplus.dll_GdipLoadImageFromFile
mov dword [ebx + 8], eax
jmp 0x4018a8
xor ebx, ebx
mov dword [esp + 0xc], ebx
mov edi, ebx
lea eax, [esp + 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test edi, edi
je 0x4018fd
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea ecx, [esi + 0x18]
lea ebx, [esp + 0x38]
call fcn.00401950
push esi
mov dword [eax], edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
je 0x4018fd
cmp dword [esi + 0x3c], 0
je 0x4018fd
cmp dword [esp + 0x50], 8
mov eax, dword [esp + 0x3c]
jae 0x4018f2
lea eax, [esp + 0x3c]
mov ecx, dword [esi + 0x3c]
mov edx, dword [ecx]
push edi
push eax
mov eax, dword [edx]
call eax
lea ecx, [esp + 0x38]
mov dword [esp + 0x270], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
push 0xffffffffffffffff
push 0
lea ecx, [esp + 0x20]
push ecx
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
jne 0x401706
mov ecx, dword [esp + 0x268]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov ecx, dword [esp + 0x254]
xor ecx, esp
call fcn.00424bfa
mov esp, ebp
pop ebp
ret