Function at 0x404040
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
fldz
push ebx
mov ebx, dword [ebp + 8]
fstp dword [ebx + 0x11c]
push esi
push edi
xor esi, esi
mov dword [ebx + 0x118], esi
mov eax, dword [0x45ab34]
push 0x85
push eax
call dword [sym.imp.USER32.dll_LoadBitmapW]
lea ecx, [esp + 0x28]
push ecx
mov dword [ebx + 0xf4], eax
mov edx, dword [ebx + 0xf4]
xor eax, eax
push 0x18
push edx
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
call dword [sym.imp.GDI32.dll_GetObjectW]
test eax, eax
je 0x4040bc
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
mov dword [ebx + 0xf8], eax
mov dword [ebx + 0xfc], ecx
mov edx, dword [ebx + 4]
mov esi, dword [sym.imp.USER32.dll_GetWindowLongW]
lea edi, [ebx + 4]
push 0xfffffffffffffff0
push edx
mov dword [esp + 0x14], edi
call esi
mov ecx, eax
or ecx, 0x6000000
cmp eax, ecx
je 0x4040e9
mov eax, dword [edi]
push ecx
push 0xfffffffffffffff0
push eax
call dword [sym.imp.USER32.dll_SetWindowLongW]
mov ecx, dword [ebx + 0xf8]
mov edx, dword [ebx + 0xfc]
xor eax, eax
push eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov eax, dword [edi]
push 0xfffffffffffffff0
push eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], edx
call esi
push eax
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.USER32.dll_AdjustWindowRect]
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x18]
push 0
sub edx, eax
push edx
mov edx, dword [esp + 0x28]
sub edx, ecx
push edx
push eax
mov eax, dword [edi]
push ecx
push eax
call dword [sym.imp.USER32.dll_MoveWindow]
fild dword [esp + 0x18]
fmul qword [0x4540c0]
call fcn.00445860
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
neg ecx
push ecx
neg edx
mov esi, eax
push edx
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.USER32.dll_OffsetRect]
mov ecx, dword [edi]
lea eax, [ebx + 0x44]
push ecx
call fcn.00409ab0
cmp dword [ebx + 0x78], 0
lea ecx, [ebx + 0x44]
jg 0x40418e
cmp dword [ecx + 0x30], 0
jl 0x40418e
mov dword [ecx + 0x38], 0
call fcn.00409b60
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
lea eax, [edx + 0x82]
add edx, 0x90
push 1
lea ecx, [esi + ecx - 0x14]
mov dword [esp + 0x38], edx
sub edx, eax
push edx
mov edx, dword [ebx + 0x48]
lea edi, [esi + 0xa]
mov dword [esp + 0x38], ecx
sub ecx, edi
push ecx
push eax
push edi
push edx
mov dword [esp + 0x44], eax
call dword [sym.imp.USER32.dll_MoveWindow]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
lea esi, [ebx + 0xc4]
mov dword [esi], edi
mov edi, dword [sym.imp.USER32.dll_OffsetRect]
push 0xffffffffffffffee
mov dword [esi + 4], eax
mov dword [esi + 8], ecx
push 0
mov dword [esi + 0xc], edx
add dword [esi], 3
push esi
call edi
mov ecx, dword [esi]
mov edx, dword [esi + 4]
lea eax, [ebx + 0x94]
mov dword [eax], ecx
mov ecx, dword [esi + 8]
push 0xffffffffffffffec
mov dword [eax + 4], edx
mov edx, dword [esi + 0xc]
push 0
mov dword [eax + 8], ecx
push eax
mov dword [eax + 0xc], edx
call edi
push str.Tahoma
push 0
push 0
mov esi, dword [sym.imp.GDI32.dll_CreateFontW]
add dword [ebx + 0xa0], 0x14
push 0
push 0
push 1
push 0
push 0
push 0
push 0x2bc
push 0
push 0
push 0
push 0xfffffffffffffff5
call esi
push str.Tahoma
push 0
push 0
push 0
push 0
push 1
push 0
push 0
push 0
push 0x190
push 0
push 0
push 0
push 0xfffffffffffffff5
mov dword [ebx + 0xc0], eax
call esi
mov dword [ebx + 0xf0], eax
push 0x13
lea esi, [ebx + 0xd4]
mov eax, str.Starting_download..
call fcn.00406a40
mov eax, dword [ebx + 0x3c]
mov esi, dword [esp + 0xc]
mov ecx, dword [esi]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push eax
push 1
push 0x80
push ecx
call edi
mov edx, dword [ebx + 0x3c]
mov eax, dword [esi]
push edx
push 0
push 0x80
push eax
call edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov esi, dword [0x45b770]
add esi, 0x10
push esi
mov dword [esp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [0x45b8ac]
lea ecx, [esp + 0x10]
call fcn.00404ca0
mov edi, eax
push esi
mov dword [esp + 0x18], edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
add ebx, 0x34
mov dword [esp + 0x10], ebx
lea esi, [edi + 4]
lea ebx, [esp + 0x10]
call fcn.00404bc0
mov edi, dword [ebp + 8]
mov esi, dword [esp + 0x14]
lea ecx, [edi + 0x38]
add esi, 0x10
lea ebx, [esp + 0x10]
mov dword [esp + 0x10], ecx
call fcn.00404bc0
mov esi, dword [esp + 0xc]
mov edx, dword [esi]
push 0x44dd08
push edx
call dword [sym.imp.USER32.dll_SetWindowTextW]
push esi
call fcn.00401690
push 1
mov eax, edi
call fcn.00404e40
lea eax, [edi + 0x100]
push eax
push 0
push edi
push 0x403e70
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [esi]
push 0
push 0x3e8
push 0x80
mov dword [edi + 0x104], eax
mov edi, dword [sym.imp.USER32.dll_SetTimer]
push ecx
call edi
mov edx, dword [esi]
push 0
push 0x32
push 0xfa
push edx
call edi
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4