Function at 0x406b90
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x428448
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x433ae0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 4], 0
cmp dword [esi + 0x10], 0
jne 0x406da8
lea eax, [ebp + 8]
push eax
call fcn.004019e0
call dword [0x434eb8]
mov edi, dword [esi]
cmp dword [edi - 0xc], 0
mov dword [ebp - 0x14], eax
je 0x406d8c
test edi, edi
jne 0x406bf4
xor eax, eax
jmp 0x406c22
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, eax
add ebx, 1
cmp ebx, 0x3fffffff
jle 0x406c0c
xor eax, eax
jmp 0x406c22
lea eax, [ebx + ebx]
call fcn.00416cb0
mov ecx, dword [ebp - 0x14]
mov eax, esp
push ecx
push ebx
push edi
push eax
call fcn.00406310
push 0
push eax
push 0
call sub.urlmon.dll_IsValidURL
test eax, eax
jne 0x406d8c
lea edi, [esi + 0x14]
call fcn.00409dd1
mov edx, dword [esi + 0x28]
push edx
mov dword [edi], eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, dword [esi + 0x28]
lea ecx, [esi + 0x1c]
push esi
mov dword [esi + 0x18], eax
call fcn.004019e0
lea ecx, [esi + 0x20]
call fcn.00401980
push 0
push 4
push 0
push 0
push edi
push 0x406e00
call fcn.0040a7cb
test eax, eax
mov dword [esi + 0x10], eax
je 0x406db2
push eax
mov eax, dword [esi + 0x2c]
push str._CUrlFile__creating_download_worker_thread__08lX
push 2
push eax
call fcn.00406520
mov ecx, dword [esi + 0x10]
mov dword [ecx + 0x28], 0
mov eax, dword [esi + 0x10]
mov edx, dword [eax + 0x2c]
add esp, 0x10
push edx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push 0
push 0
push 0
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
je 0x406db2
mov edi, dword [sym.imp.USER32.dll_DispatchMessageA]
mov eax, dword [ebp - 0x2c]
cmp eax, 0x402
jne 0x406cf5
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x406d28
cmp dword [eax + 8], 5
jne 0x406d28
mov ebx, dword [eax + 0xc]
mov ecx, dword [esi + 0xc]
mov edx, dword [ecx]
mov edx, dword [edx]
push ebx
mov ebx, dword [eax + 4]
mov eax, dword [eax]
push 5
push ebx
push eax
call edx
jmp 0x406d28
cmp eax, 0x10
je 0x406d3e
cmp eax, 0x12
je 0x406d60
cmp eax, 0x401
je 0x406d6a
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x28]
push ecx
push edx
push eax
mov eax, dword [esi + 0x2c]
push str._CUrlFile__launchDownload_message_received_msg.message__u__msg.wParam__i__msg.lParam__i
push 2
push eax
call fcn.00406520
add esp, 0x18
lea ecx, [ebp - 0x30]
push ecx
call edi
push 0
push 0
push 0
lea edx, [ebp - 0x30]
push edx
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
jne 0x406cc6
jmp 0x406db2
mov eax, dword [esi + 0x2c]
push str._CUrlFile__launchDownload_message_received_WM_CLOSE
push 2
push eax
call fcn.00406520
mov ecx, dword [esi + 0x28]
add esp, 0xc
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
call fcn.00406ad0
lea ecx, [ebp + 8]
call fcn.00401ad0
jmp 0x406dd8
mov edx, dword [esi + 0x2c]
push str._CUrlFile__launchDownload_message_received_WM_USER_ENDDOWNLOAD
push 2
push edx
call fcn.00406520
add esp, 0xc
call fcn.00406ad0
lea ecx, [ebp + 8]
call fcn.00401ad0
jmp 0x406dd8
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x406dcc
mov ecx, dword [esi + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406dd8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esp, [ebp - 0x44]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041531b
mov esp, ebp
pop ebp
ret 4