Function at 0x4046f0
Capabilities:
Get geographical location
Get keyboard layout
Hide graphical window
Link many functions at runtime

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x44
mov edi, dword [esp + 0x58]
mov esi, dword [esp + 0x5c]
mov eax, dword [0x483038]
xor eax, esp
mov dword [esp + 0x40], eax
call fcn.00432540
mov dword [0x483b08], edi
mov dword [0x483b04], esi
call fcn.0042d530
call fcn.0041f9b0
call fcn.00424470
call fcn.0041d9d0
call fcn.00433300
cmp dword [0x486220], 4
jb 0x404748
jne 0x404758
cmp dword [0x486228], 2
je 0x404758
push str.MSWHEEL_ROLLMSG
call dword [sym.imp.USER32.dll_RegisterWindowMessageA]
mov dword [section..data], eax
call fcn.0040ae10
push str.user32.dll
call fcn.00432610
add esp, 4
mov esi, eax
push str.winmm.dll
call fcn.00432610
add esp, 4
mov ebx, eax
push str.shcore.dll
call fcn.00432610
add esp, 4
mov edi, eax
test esi, esi
je 0x4047ab
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.FlashWindowEx
push esi
call ebp
mov dword [0x484c74], eax
push str.ToUnicodeEx
push esi
call ebp
jmp 0x4047b7
mov dword [0x484c74], 0
xor eax, eax
mov dword [0x484d34], eax
test ebx, ebx
je 0x4047ce
push str.PlaySoundA
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
jmp 0x4047d0
xor eax, eax
mov dword [0x484c68], eax
test esi, esi
je 0x404803
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.GetMonitorInfoA
push esi
call ebx
mov dword [0x484cf4], eax
push str.MonitorFromPoint
push esi
call ebx
mov dword [0x484cf8], eax
push str.MonitorFromWindow
push esi
call ebx
jmp 0x404819
mov dword [0x484cf4], 0
mov dword [0x484cf8], 0
xor eax, eax
mov dword [0x484ca4], eax
test edi, edi
je 0x404830
push str.GetDpiForMonitor
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
jmp 0x404832
xor eax, eax
mov dword [0x484ca0], eax
test esi, esi
je 0x404858
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.GetSystemMetricsForDpi
push esi
call edi
mov dword [0x484c7c], eax
push str.AdjustWindowRectExForDpi
push esi
call edi
jmp 0x404864
mov dword [0x484c7c], 0
xor eax, eax
mov dword [0x484c80], eax
call fcn.0042ed80
mov dword [0x483b10], eax
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
cmp eax, 1
jbe 0x4048c8
push dword [0x464808]
push str._s_Fatal_Error
call fcn.004301c0
add esp, 8
mov esi, eax
push 0x30
push eax
push str.Failed_to_initialize_COM_subsystem
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
call fcn.00430760
add esp, 4
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.00441724
mov eax, 1
add esp, 0x44
pop esi
pop edi
pop ebx
pop ebp
ret 0x10
push dword [esp + 0x60]
push dword [0x483b10]
call fcn.0040ac50
add esp, 8
push 0xb0c
push 0
push 0x483b14
call fcn.00444340
add esp, 0xc
push 0x6f
push dword [0x483b10]
call fcn.0042f050
add esp, 8
mov dword [0x4846d0], eax
push 0xa6
push dword [0x483b10]
call fcn.0042f050
add esp, 8
mov dword [0x4846d4], eax
mov dword [0x484620], 0xa
mov dword [0x484624], 0x14
mov dword [0x484628], 0x19
mov dword [0x48462c], 0x1c
push 0x7e
push dword [0x483b10]
call fcn.0042f050
add esp, 8
lea eax, [eax + eax*4]
lea ebp, [eax + eax]
add ebp, 0x19
mov edi, dword [0x48462c]
mov ebx, dword [0x484624]
push 0x7f
push dword [0x483b10]
call fcn.0042f050
add esp, 8
mov esi, eax
imul esi, ebx
add esi, edi
cmp dword [0x484cf4], 0
je 0x4049d1
mov eax, dword [0x484ca4]
test eax, eax
je 0x4049d1
push 2
push dword [0x483004]
call eax
mov dword [esp + 0x18], 0x28
lea ecx, [esp + 0x18]
push ecx
push eax
call dword [0x484cf4]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov dword [esp + 8], eax
mov dword [esp + 0xc], ecx
mov eax, dword [esp + 0x24]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x14], eax
jmp 0x4049e3
call dword [sym.imp.USER32.dll_GetDesktopWindow]
lea ecx, [esp + 8]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
sub eax, dword [esp + 8]
cmp ebp, eax
cmovle eax, ebp
mov dword [esp + 4], eax
sub ebx, dword [esp + 0xc]
cmp esi, ebx
cmovle ebx, esi
push dword [0x46480c]
call fcn.00428110
add esp, 4
test eax, eax
jne 0x404a17
xor edi, edi
jmp 0x404a1e
mov al, byte [eax + 0x58]
and al, 1
mov edi, eax
mov esi, dword [0x464808]
push esi
push 0
push 0
call fcn.004302e0
add esp, 0xc
mov dword [esp], eax
push esi
push 0
push 0
call fcn.004302e0
add esp, 0xc
mov dword [0x484630], eax
push esi
push 0
push 0
call fcn.004302e0
add esp, 0xc
mov dword [0x484634], eax
push pe_nt_image_headers32
push dword [0x483b10]
call fcn.0042efa0
add esp, 8
movzx esi, al
shl esi, 0x15
or esi, 0xcf0000
push 0x7a
push dword [0x483b10]
call fcn.0042f050
add esp, 8
mov ecx, esi
and ecx, 0xea0000
mov edx, edi
test dl, dl
cmovne esi, ecx
cmp eax, 1
cmove esi, ecx
push 0x61
push dword [0x483b10]
call fcn.0042efa0
add esp, 8
movzx edi, al
lea ebp, [edi*8]
push 0x8a
push dword [0x483b10]
call fcn.0042efa0
add esp, 8
lea edi, [edi*8 + 0x200]
test al, al
cmove edi, ebp
mov byte [0x484638], 1
call fcn.00401060
push 0
push dword [esp + 0x5c]
push 0
push 0
push ebx
push dword [esp + 0x18]
push 0x80000000
push 0x80000000
push esi
mov ecx, dword [esp + 0x24]
mov ebx, ecx
push ecx
push eax
push edi
call dword [sym.imp.USER32.dll_CreateWindowExW]
mov dword [0x483004], eax
test eax, eax
jne 0x404b2a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004333f0
add esp, 4
push eax
push str.Unable_to_create_terminal_window:__s
call fcn.00405390
mov dword [0x484650], 0
mov dword [0x48464c], 0
mov dword [0x484648], 0
mov dword [0x484644], 0
mov dword [0x484640], 0
mov dword [0x48463c], 0
cmp dword [0x484ca0], 0
je 0x404bbd
mov ecx, dword [0x484ca4]
test ecx, ecx
je 0x404bbd
push 1
push eax
call ecx
lea ecx, [esp + 8]
lea edx, [esp + 0x18]
push ecx
push edx
push 0
push eax
call dword [0x484ca0]
test eax, eax
jne 0x404baa
mov ecx, dword [esp + 0x18]
mov dword [0x48463c], ecx
mov eax, dword [esp + 8]
mov dword [0x484640], eax
jmp 0x404bb5
mov ecx, dword [0x48463c]
mov eax, dword [0x484640]
test ecx, ecx
je 0x404bbd
test eax, eax
jne 0x404bf2
push dword [0x483004]
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
mov esi, dword [sym.imp.GDI32.dll_GetDeviceCaps]
push 0x58
push eax
call esi
mov dword [0x48463c], eax
push 0x5a
push edi
call esi
mov dword [0x484640], eax
push edi
push dword [0x483004]
call dword [sym.imp.USER32.dll_ReleaseDC]
push ebx
call fcn.00430760
add esp, 4
xor esi, esi
xor ecx, ecx
xor edx, edx
call fcn.00405400
mov dword [0x484698], 0
push 0x414
push 8
push 1
call fcn.004306d0
add esp, 0xc
mov dword [0x484694], eax
mov dword [eax], 0x1060300
nop
nop
nop
nop
mov byte [eax + esi*4 + 7], 4
mov byte [eax + esi*4 + 0xb], 4
add esi, 2
cmp esi, 0x106
jne 0x404c30
mov dword [0x484654], 0x464004
push 0x484654
push 0x483b14
push dword [0x483b10]
call fcn.0040e800
add esp, 0xc
mov esi, eax
mov dword [0x484658], eax
mov edi, dword [0x483b10]
cmp dword [eax + 0x1120], 1
je 0x404c94
push 0x3dc
push str._home_simon_mem_.build_workdirs_bob_fffbk9my_putty_windows_window.c
push str.term__mouse_select_clipboards_0___CLIP_LOCAL
call fcn.0044edd0
add esp, 0xc
mov dword [esi + 0x112c], 1
push 0x9f
push edi
call fcn.0042efa0
add esp, 8
test al, al
je 0x404cca
mov eax, dword [esi + 0x112c]
lea ecx, [eax + 1]
mov dword [esi + 0x112c], ecx
mov dword [esi + eax*4 + 0x1120], 2
push 0xa0
push edi
call fcn.0042f050
add esp, 8
xor ecx, ecx
cmp eax, 2
sete cl
add ecx, ecx
cmp eax, 1
cmove ecx, eax
mov dword [esi + 0x1130], ecx
push dword [0x483b10]
push 0x48300c
call fcn.00425230
add esp, 8
mov dword [0x48465c], eax
push eax
push dword [0x484658]
call fcn.00416040
add esp, 8
push 0x6b
push dword [0x483b10]
call fcn.0042f050
add esp, 8
mov esi, eax
push 0x7e
push dword [0x483b10]
call fcn.0042f050
add esp, 8
mov edi, eax
push 0x7f
push dword [0x483b10]
call fcn.0042f050
add esp, 8
push esi
push edi
push eax
push dword [0x484658]
call fcn.0040edc0
add esp, 0x10
lea eax, [esp + 8]
push eax
push dword [0x483004]
call dword [sym.imp.USER32.dll_GetWindowRect]
lea ebx, [esp + 0x18]
push ebx
push dword [0x483004]
call dword [sym.imp.USER32.dll_GetClientRect]
push 0x8b
push dword [0x483b10]
call fcn.0042f050
add esp, 8
mov dword [0x484660], eax
mov dword [0x484664], eax
add eax, eax
mov ecx, dword [esp + 0x10]
add ecx, eax
mov edx, dword [esp + 8]
mov esi, dword [esp + 0xc]
add edx, dword [esp + 0x20]
sub ecx, edx
add ecx, dword [esp + 0x18]
add eax, dword [esp + 0x14]
mov dword [0x484628], ecx
add esi, dword [esp + 0x24]
sub eax, esi
add eax, dword [esp + 0x1c]
mov dword [0x48462c], eax
mov edx, dword [0x484658]
mov esi, dword [edx + 0x128]
mov edx, dword [edx + 0x12c]
imul edx, dword [0x484620]
add edx, ecx
imul esi, dword [0x484624]
add esi, eax
push 0xe
push esi
push edx
push 0
push 0
push 0
push dword [0x483004]
call dword [sym.imp.USER32.dll_SetWindowPos]
mov edi, dword [0x484620]
lea eax, [edi + 0xf]
add edi, 0x1e
test eax, eax
cmovns edi, eax
sar edi, 4
imul edi, dword [0x484624]
add edi, edi
push 0
push 1
push edi
call fcn.004306d0
add esp, 0xc
mov esi, eax
push edi
push 0
push eax
call fcn.00444340
add esp, 0xc
push esi
push 1
push 1
push dword [0x484624]
push dword [0x484620]
call dword [sym.imp.GDI32.dll_CreateBitmap]
mov dword [0x484668], eax
push esi
call fcn.00430760
add esp, 4
push dword [0x484624]
push dword [0x484620]
push dword [0x484668]
push dword [0x483004]
call dword [sym.imp.USER32.dll_CreateCaret]
mov dword [esp + 0x18], 0x1c
mov dword [esp + 0x1c], 0x1f
mov dword [esp + 0x20], 0
mov eax, dword [0x484658]
mov eax, dword [eax + 0x128]
lea ecx, [eax - 1]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], 0
push 0
push ebx
push 1
push dword [0x483004]
call dword [sym.imp.USER32.dll_SetScrollInfo]
mov dword [0x48466c], 0
mov dword [0x484670], 0
call dword [sym.imp.USER32.dll_GetDoubleClickTime]
mov dword [0x484674], eax
push 0
push dword [0x483004]
call dword [sym.imp.USER32.dll_GetSystemMenu]
mov dword [0x484678], eax
call dword [sym.imp.USER32.dll_CreatePopupMenu]
mov dword [0x48467c], eax
mov ebp, dword [sym.imp.USER32.dll_AppendMenuA]
push 0x47341b
push 0x190
push 0
push eax
call ebp
push str.Paste
push 0x1a0
push 0
push dword [0x48467c]
call ebp
call dword [sym.imp.USER32.dll_CreateMenu]
mov dword [0x484680], eax
push 1
push 0x484684
call fcn.0042d340
add esp, 8
mov esi, dword [sym.imp.USER32.dll_DeleteMenu]
nop
nop
push 0x400
push 0
push dword [0x484680]
call esi
test eax, eax
jne 0x404f50
cmp dword [0x484684], 2
jl 0x404fb4
mov esi, 1
mov edi, 0x1000
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [0x484688]
push dword [eax + esi*4]
push edi
push 0
push dword [0x484680]
call ebp
add esi, 1
mov eax, dword [0x484684]
cmp eax, 0x401
mov ecx, 0x401
cmovl ecx, eax
add edi, 0x10
cmp esi, ecx
jl 0x404f80
cmp eax, 1
jg 0x404fcc
push str._No_sessions_
push 0x1000
push 1
push dword [0x484680]
call dword [sym.imp.USER32.dll_AppendMenuA]
xor eax, eax
mov bl, 1
jmp 0x40501c
push dword [0x464808]
push str.About__s
call fcn.004301c0
add esp, 8
mov esi, eax
push eax
push 0x150
push 0
push edi
call ebp
push esi
call fcn.00430760
add esp, 4
mov eax, 1
invalid