Function at 0x409140
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x9c
mov eax, dword [0x4ce540]
xor eax, esp
mov dword [esp + 0x98], eax
push ebx
push esi
xor eax, eax
push edi
xor edi, edi
push 0x2c
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
lea eax, [esp + 0x38]
push edi
push eax
mov esi, ecx
mov dword [esp + 0x20], edi
mov dword [esp + 0x3c], edi
call fcn.00427b00
mov eax, dword [0x4c8084]
mov ecx, dword [str.websocket]
mov edx, dword [0x4c8080]
add esp, 0xc
push 0x2c
mov dword [esp + 0x6c], eax
mov dword [esp + 0x64], ecx
mov ecx, dword [0x4c8088]
mov dword [esp + 0x68], edx
mov edx, dword [0x4c808c]
lea eax, [esp + 0x78]
push edi
push eax
mov dword [esp + 0x78], ecx
mov dword [esp + 0x7c], edx
call fcn.00427b00
mov ecx, dword [esi + 0x90]
add esp, 0xc
push ecx
lea edx, [esp + 0x64]
push edx
mov eax, edx
push str._ws_x
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea edx, [esp + 0x30]
lea ecx, [esp + 0x60]
push edx
mov dword [esp + 0x34], 0x30
mov dword [esp + 0x38], 3
mov dword [esp + 0x3c], 0x40a5a0
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], 5
mov dword [esp + 0x58], edi
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x60], edi
call fcn.004127b0
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
movzx eax, ax
xor ecx, ecx
mov dword [esp + 0x10], eax
cmp cx, ax
jne 0x4092b5
call ebx
cmp eax, 0x582
je 0x4092b5
call ebx
call ebx
test eax, 0x20000000
je 0x40928e
cmp eax, edi
jle 0x409385
and eax, 0xffff
or eax, 0xa0070000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x98]
xor ecx, esp
call fcn.004265ea
mov esp, ebp
pop ebp
ret
cmp eax, edi
jle 0x409385
and eax, 0xffff
or eax, 0x80070000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x98]
xor ecx, esp
call fcn.004265ea
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x58]
push edi
push edi
push SysReAllocString
push edi
push edi
push 0x20000000
push 0x4c664c
push edx
call fcn.00412880
mov dword [esi + 4], eax
cmp eax, edi
jne 0x409313
call ebx
call ebx
test eax, 0x20000000
je 0x4092fd
cmp eax, edi
jg 0x4092ef
mov esi, eax
jmp 0x409372
and eax, 0xffff
or eax, 0xa0070000
mov esi, eax
jmp 0x409372
cmp eax, edi
jg 0x409305
mov esi, eax
jmp 0x409372
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
jmp 0x409372
push edi
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [esi + 4]
push esi
push 0xffffffffffffffeb
push eax
call dword [sym.imp.USER32.dll_SetWindowLongW]
mov ecx, dword [esi + 0x53c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov esi, dword [sym.imp.USER32.dll_GetMessageW]
push edi
push edi
push edi
lea edx, [esp + 0x20]
push edx
call esi
test eax, eax
je 0x409370
mov ebx, dword [sym.imp.USER32.dll_TranslateMessage]
nop
lea eax, [esp + 0x14]
push eax
call ebx
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.USER32.dll_DispatchMessageW]
push edi
push edi
push edi
lea edx, [esp + 0x20]
push edx
call esi
test eax, eax
jne 0x409350
xor esi, esi
cmp word [esp + 0x10], di
je 0x409383
mov eax, dword [esp + 0x58]
push eax
call fcn.004126e0
mov eax, esi
mov ecx, dword [esp + 0xa4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004265ea
mov esp, ebp
pop ebp
ret