Function at 0x404050
Capabilities:
Create thread
Get geographical location
Hide graphical window
Inspect load icon resource

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x1d8
mov eax, dword [0x545004]
xor eax, esp
mov dword [esp + 0x1d4], eax
movups xmm0, xmmword [str.OOCerealBox]
push esi
push edi
mov edi, dword [ebp + 8]
movups xmmword [esp + 0x1b0], xmm0
movq xmm0, qword [0x545cf0]
movq qword [esp + 0x1c0], xmm0
call dword [sym.imp.USER32.dll_SetProcessDPIAware]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [0x563610], eax
lea eax, [esp + 0x5c]
push eax
push 0
push str.DebugLiveCoding_CerealBox.exe
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x4040ce
mov eax, dword [esp + 0x70]
mov dword [0x563608], eax
mov eax, dword [esp + 0x74]
mov dword [0x56360c], eax
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0
call esi
push 1
mov dword [0x563500], eax
call esi
push 1
push 0x188ce10
mov dword [0x563504], eax
mov dword [0x5634f0], 0x500
mov dword [0x5634f4], 0x2d0
mov dword [0x563638], 0x188ce10
mov dword [0x56363c], 0
mov byte [0x5634e8], 1
call fcn.005238a7
movaps xmm0, xmmword [0x53ec50]
add esp, 8
mov edx, dword [ebp + 0x10]
xor ecx, ecx
mov dword [0x562bd4], eax
mov eax, 0x5630a0
movups xmmword [0x563084], xmm0
mov dword [0x563094], 0x270025
mov dword [0x563098], 0x1b0009
mov dword [esp + 0x18], eax
nop dword [eax]
cmp byte [ecx + edx], 0x22
mov eax, dword [esp + 0x18]
je 0x404177
mov dl, byte [ecx + edx]
mov byte [eax], dl
inc eax
mov edx, dword [ebp + 0x10]
mov dword [esp + 0x18], eax
cmp byte [ecx + edx], 0
je 0x4041ec
cmp byte [ecx + edx + 1], 0x22
mov eax, dword [esp + 0x18]
je 0x404196
mov dl, byte [ecx + edx + 1]
mov byte [eax], dl
inc eax
mov edx, dword [ebp + 0x10]
mov dword [esp + 0x18], eax
cmp byte [ecx + edx + 1], 0
je 0x4041ec
cmp byte [ecx + edx + 2], 0x22
mov eax, dword [esp + 0x18]
je 0x4041b6
mov dl, byte [ecx + edx + 2]
mov byte [eax], dl
inc eax
mov edx, dword [ebp + 0x10]
mov dword [esp + 0x18], eax
cmp byte [ecx + edx + 2], 0
je 0x4041ec
cmp byte [ecx + edx + 3], 0x22
mov eax, dword [esp + 0x18]
je 0x4041d6
mov dl, byte [ecx + edx + 3]
mov byte [eax], dl
inc eax
mov edx, dword [ebp + 0x10]
mov dword [esp + 0x18], eax
cmp byte [ecx + edx + 3], 0
je 0x4041ec
add ecx, 4
cmp ecx, 0x400
jl 0x404160
push 0
push 0x563640
push 0x538204
push 0x800
push edi
call dword [sym.imp.DINPUT8.dll_DirectInput8Create]
call fcn.00404d10
mov ecx, dword [0x563640]
test ecx, ecx
je 0x404226
mov eax, dword [ecx]
push 1
push 0
push 0x404c10
mov eax, dword [eax + 0x10]
push 4
push ecx
call eax
push 1
push 0xd7550
mov dword [0x5635f4], 0x521950
mov dword [0x5635f8], 0x521b80
call fcn.005238a7
push 0x30
mov dword [0x5634dc], eax
lea eax, [esp + 0x38]
push 0
push eax
call fcn.00522b50
mov esi, dword [sym.imp.USER32.dll_LoadIconW]
add esp, 0x14
mov dword [esp + 0x2c], 0x30
mov dword [esp + 0x30], 8
mov dword [esp + 0x34], 0x4039a0
push 0x7f05
push 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], edi
call esi
push 0x7f00
push 0
mov dword [esp + 0x4c], eax
call dword [sym.imp.USER32.dll_LoadCursorW]
mov dword [esp + 0x48], eax
lea eax, [esp + 0x1b0]
mov dword [esp + 0x54], eax
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.USER32.dll_RegisterClassExW]
test ax, ax
jne 0x4042df
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x1d4]
xor ecx, esp
call fcn.00521bd2
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [0x563500]
mov eax, dword [0x563504]
push 0
mov dword [0x5634f4], eax
movd xmm0, ecx
cvtdq2ps xmm0, xmm0
mov dword [0x5634b8], eax
mov dword [0x5634c0], eax
mov dword [esp + 0x2c], eax
push ioctlsocket
mov dword [0x5634f0], ecx
movss dword [0x5634cc], xmm0
movd xmm0, eax
lea eax, [esp + 0x24]
cvtdq2ps xmm0, xmm0
push eax
mov dword [0x5634f8], 0xffffffff
mov dword [0x5634fc], 0xffffffff
mov dword [0x5634c4], 0
mov dword [0x5634c8], 0
mov dword [0x5634b4], ecx
movss dword [0x5634d0], xmm0
mov dword [0x5634bc], ecx
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], ecx
call dword [sym.imp.USER32.dll_AdjustWindowRect]
mov eax, dword [esp + 0x28]
sub eax, dword [esp + 0x20]
push 0
push edi
push 0
push 0
push eax
mov eax, dword [esp + 0x38]
sub eax, dword [esp + 0x30]
push eax
push 0
push 0
push ioctlsocket
lea eax, [esp + 0x1d4]
push eax
push eax
push 0
call dword [sym.imp.USER32.dll_CreateWindowExW]
push 0x65
push edi
mov dword [0x562bc8], eax
call esi
test eax, eax
je 0x4043d0
push eax
push 1
push 0x80
push dword [0x562bc8]
call dword [sym.imp.USER32.dll_SendMessageW]
push 0x100
lea eax, [esp + 0x98]
mov dword [esp + 0x84], 0x11c
push 0
push eax
mov dword [esp + 0x90], 0
mov dword [esp + 0x94], 0
mov dword [esp + 0x98], 0
mov dword [esp + 0x9c], 0
call fcn.00522b50
mov esi, dword [sym.imp.KERNEL32.dll_VerSetConditionMask]
add esp, 0xc
xor eax, eax
mov dword [esp + 0x194], eax
mov dword [esp + 0x198], eax
push 3
push 0x20
push 3
push 1
push 3
push 2
push eax
push eax
call esi
push edx
push eax
call esi
push edx
push eax
call esi
push edx
push eax
push 0x23
lea eax, [esp + 0x8c]
mov dword [esp + 0x90], 6
xor ecx, ecx
mov dword [esp + 0x94], 2
push eax
mov word [esp + 0x1a4], cx
call dword [sym.imp.KERNEL32.dll_VerifyVersionInfoW]
test eax, eax
je 0x40448a
push 0
call dword [sym.imp.USER32.dll_EnableMouseInPointer]
push 0x5e
mov byte [0x562fdc], 0
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test al, 0xc
mov ecx, 1
movzx eax, byte [0x562fdc]
cmovne eax, ecx
mov ecx, 0x562bc8
mov byte [0x562fdc], al
call fcn.004030a0
push dword [ebp + 0x14]
push dword [0x562bc8]
call dword [sym.imp.USER32.dll_ShowWindow]
push dword [0x562bc8]
call dword [sym.imp.USER32.dll_UpdateWindow]
push dword [0x562bc8]
mov dword [0x562bd8], 0x3c888889
call dword [sym.imp.USER32.dll_GetDC]
push 0x74
push eax
mov dword [0x562bcc], eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
push 0xa
lea eax, [esp + 0x1a8]
mov byte [0x563508], 1
push eax
push 0x59
xorps xmm0, xmm0
mov byte [esp + 0x1b0], 0
push 0
movq qword [esp + 0x1b5], xmm0
mov byte [esp + 0x1bd], 0
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
mov ecx, 0x545cdc
lea eax, [esp + 0x1a4]
nop dword [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404560
test dl, dl
je 0x40455c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404560
add eax, 2
add ecx, 2
test dl, dl
jne 0x404540
xor ecx, ecx
jmp 0x404565
sbb ecx, ecx
or ecx, 1
mov esi, dword [sym.imp.KERNEL32.dll_CreateThread]
xor eax, eax
push 0
push 0
push 0x562bc8
push 0x403d40
test ecx, ecx
push 0
sete al
push 0
mov dword [0x56309c], eax
call esi
push 0
push 0
push 0x562bc8
push 0x403e60
push 0
push 0
mov byte [0x563634], 1
call esi
cmp byte [0x563634], 0
je 0x404606
mov esi, dword [sym.imp.USER32.dll_PeekMessageW]
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
nop dword [eax + eax]
push 1
push 0
push 0
push 0
push 0x563618
call esi
test eax, eax
je 0x4045fd
movzx eax, byte [0x5634e8]
xor ecx, ecx
cmp dword [0x56361c], 0x12
push 0x563618
cmove eax, ecx
mov byte [0x5634e8], al
call edi
push 0x563618
call dword [sym.imp.USER32.dll_DispatchMessageW]
cmp byte [0x563634], 0
jne 0x4045c0
push dword [0x563610]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x1dc]
mov eax, dword [0x563620]
pop edi
pop esi
xor ecx, esp
call fcn.00521bd2
mov esp, ebp
pop ebp
ret 0x10