Function at 0x405400
Capabilities:
Get graphical window text
Hide graphical window

Disassembly:
sub esp, 0x12c
mov eax, dword [0x41f050]
xor eax, esp
mov dword [esp + 0x128], eax
mov eax, dword [esi + 0x20]
test eax, eax
je 0x405630
push ebx
push ebp
push edi
push 0x11b
lea ecx, [esp + 0x1c]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetWindowTextA]
cmp byte [esp + 0x18], 0
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
mov ebp, dword [sym.imp.USER32.dll_GetDlgItem]
jne 0x40553e
mov edx, dword [esi + 0x20]
push 5
push edx
call dword [sym.imp.USER32.dll_ShowWindow]
movzx eax, word [esi + 0x4270]
push eax
call sub.WSOCK32.dll_ntohs
cmp ax, 1
mov edi, 0x419f50
je 0x405473
mov edi, str.from
mov ecx, dword [esi + 0x4264]
push ecx
call sub.WSOCK32.dll_inet_ntoa
push eax
push edi
lea edx, [esi + 0x4272]
push edx
lea eax, [esp + 0x24]
push str._s__s__s
push eax
call ebx
mov edx, dword [esi + 0x20]
add esp, 0x14
lea ecx, [esp + 0x18]
push ecx
push edx
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov eax, dword [esi + 0x4480]
test eax, eax
je 0x4054c2
push eax
lea eax, [esp + 0x1c]
push str.File_size_:__d
push eax
call ebx
add esp, 0xc
jmp 0x405527
lea ecx, [esp + 0x18]
push str.File_size_:_Unknown
push ecx
call ebx
mov edx, dword [esi + 0x20]
add esp, 8
push 0
push 0x4b0
push edx
call ebp
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov edi, dword [sym.imp.USER32.dll_GetDialogBaseUnits]
push 0x206
call edi
shr eax, 0x10
imul eax, eax, 0x23
cdq
and edx, 7
add eax, edx
sar eax, 3
push eax
call edi
movzx eax, ax
imul eax, eax, 0x82
cdq
and edx, 3
add eax, edx
sar eax, 2
push eax
mov eax, dword [esi + 0x20]
push 0
push 0
push 0
push eax
call dword [sym.imp.USER32.dll_SetWindowPos]
mov edx, dword [esi + 0x20]
lea ecx, [esp + 0x18]
push ecx
push 0x4b1
push edx
call ebp
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
lea eax, [esp + 0xc]
push eax
call fcn.0040c66a
mov ecx, dword [esi + 0x448c]
add esp, 4
cmp ecx, dword [esp + 0xc]
jne 0x405567
mov edx, dword [esi + 0x4490]
cmp edx, dword [esp + 0x10]
je 0x40562d
mov eax, dword [esi + 0x20]
push 0x4b0
push eax
call ebp
mov ecx, dword [esi + 0x4480]
cmp ecx, 0x64
mov edi, eax
jbe 0x4055a4
mov eax, 0x51eb851f
mul ecx
mov eax, dword [esi + 0x4478]
mov ecx, edx
shr ecx, 5
xor edx, edx
div ecx
push 0
push eax
push 0x402
push edi
call dword [sym.imp.USER32.dll_SendMessageA]
movzx edx, word [esi + 0x4270]
push edx
call sub.WSOCK32.dll_ntohs
cmp ax, 1
mov dword [esp + 0x14], str.sent
je 0x4055c7
mov dword [esp + 0x14], str.rcvd
mov eax, dword [esp + 0xc]
sub eax, dword [esi + 0x4484]
mov ecx, dword [esp + 0x10]
sbb ecx, dword [esi + 0x4488]
mov edi, dword [esi + 0x4478]
push ecx
push eax
push 0
push edi
call fcn.0040dcd0
push edx
mov edx, dword [esp + 0x18]
push eax
push edx
push edi
lea eax, [esp + 0x28]
push str._d_Bytes__s__t__d_Bytes_sec
push eax
call ebx
mov edx, dword [esi + 0x20]
add esp, 0x18
lea ecx, [esp + 0x18]
push ecx
push 0x4b2
push edx
call ebp
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov dword [esi + 0x448c], eax
mov dword [esi + 0x4490], ecx
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x128]
xor ecx, esp
call fcn.0040c6a6
add esp, 0x12c
ret