Function at 0x40c830
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
push esi
push edi
cmp dword [ebp + 8], 0
jne 0x40c857
push 0xe
push 0x5a
push 0x430744
call fcn.0040b010
add esp, 0xc
or eax, 0xffffffff
jmp 0x40d1b8
mov dword [ebp - 0x14], 0x40000000
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x10]
mov dword [ecx + 0x898], 0
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x10]
mov dword [eax], 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x10]
mov dword [edx + 4], 0
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x10]
mov byte [ecx + 0xa], 0
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x10]
mov byte [eax + 9], 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x10]
mov byte [edx + 8], 0
mov dword [ebp - 8], 0x64
mov eax, dword [ebp - 8]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x34], 0
jmp 0x40c8c4
mov ecx, dword [ebp - 0x34]
add ecx, 1
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp - 0x34]
cmp edx, dword [ebp + 0x10]
jge 0x40ca26
mov eax, dword [ebp - 0x34]
imul eax, eax, 0x28
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx + eax]
mov dword [ebp - 0x3c], edx
mov eax, dword [ebp - 0x3c]
sub eax, 1
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0x13
ja case.0x40c8fc.2
mov ecx, dword [ebp - 0x3c]
movzx edx, byte [ecx + 0x40d1e8]
jmp dword [edx*4 + 0x40d1c0]
mov eax, dword [ebp - 0x34]
imul eax, eax, 0x28
mov ecx, dword [ebp + 0x14]
fld qword [0x42d748]
fcomp qword [ecx + eax + 8]
fnstsw ax
test ah, 5
jp 0x40c935
mov edx, dword [ebp - 0x34]
imul edx, edx, 0x28
mov eax, dword [ebp + 0x14]
fld qword [eax + edx + 8]
fadd qword [0x42d728]
fstp qword [ebp - 0x44]
jmp 0x40c93e
fld qword [0x42d748]
fstp qword [ebp - 0x44]
fld qword [ebp - 0x44]
call fcn.0042b990
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0x34]
imul ecx, ecx, 0x28
mov edx, dword [ebp + 0x14]
fld qword [0x42d748]
fcomp qword [edx + ecx + 0x10]
fnstsw ax
test ah, 5
jp 0x40c97b
mov eax, dword [ebp - 0x34]
imul eax, eax, 0x28
mov ecx, dword [ebp + 0x14]
fld qword [ecx + eax + 0x10]
fadd qword [0x42d728]
fstp qword [ebp - 0x4c]
jmp 0x40c984
fld qword [0x42d748]
fstp qword [ebp - 0x4c]
fld qword [ebp - 0x4c]
call fcn.0042b990
mov dword [ebp - 8], eax
jmp 0x40ca21
mov edx, dword [ebp - 0x14]
or edx, 0x800000
mov dword [ebp - 0x14], edx
jmp 0x40ca21
jmp 0x40ca21
jmp 0x40ca21
jmp 0x40ca21
jmp 0x40ca21
push 0x43075c
push 0xa
push 0x78
push 0x430768
call fcn.0040b010
add esp, 0x10
or eax, 0xffffffff
jmp 0x40d1b8
mov eax, dword [ebp - 0x34]
imul eax, eax, 0x28
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x10]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + eax + 8]
mov dword [edx + 0x898], eax
jmp 0x40ca21
mov ecx, dword [ebp - 0x34]
imul ecx, ecx, 0x28
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax + ecx + 8]
mov dword [edx + 0x14], ecx
jmp 0x40ca21
mov edx, dword [ebp - 0x34]
imul edx, edx, 0x28
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax + edx]
push ecx
push 1
push 0x81
push 0x430780
call fcn.0040b010
add esp, 0x10
or eax, 0xffffffff
jmp 0x40d1b8
jmp 0x40c8bb
lea edx, [ebp - 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.004130f0
add esp, 8
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x10]
fldz
fstp qword [edx + 0x848]
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x10]
fldz
fstp qword [ecx + 0x850]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x10]
fld1
fstp qword [eax + 0x858]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x10]
fld1
fstp qword [edx + 0x860]
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x10]
fild dword [ebp - 0xc]
fstp qword [ecx + 0x868]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x10]
fild dword [ebp - 8]
fstp qword [eax + 0x870]
push 0
mov ecx, dword [0x43efec]
push ecx
mov eax, dword [ebp + 0xc]
sub eax, dword [0x43f028]
cdq
mov ecx, 0x18
idiv ecx
push eax
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xc]
push eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0xc]
push edx
push 0
push 0
mov eax, dword [ebp - 0x14]
push eax
push 0x430798
push 0x4307a0
push 0
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0xc], eax
mov edx, dword [ebp + 0xc]
cmp dword [edx + 0xc], 0
jne 0x40cafb
push 7
push 0x8e
push 0x4307ac
call fcn.0040b010
add esp, 0xc
or eax, 0xffffffff
jmp 0x40d1b8
push 5
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0xc]
push ecx
call dword [sym.imp.USER32.dll_ShowWindow]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0xc]
push eax
call dword [sym.imp.USER32.dll_UpdateWindow]
push 0x7f00
push 0
call dword [sym.imp.USER32.dll_LoadCursorA]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0xc]
push edx
call dword [sym.imp.USER32.dll_GetDC]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x10]
mov dword [edx + 0x8a0], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x10]
mov dword [ecx + 0x8ec], 2
mov edx, 0x300
mov word [ebp - 0x30], dx
mov eax, 2
mov word [ebp - 0x2e], ax
mov byte [ebp - 0x2c], 0xff
mov byte [ebp - 0x2b], 0xff
mov byte [ebp - 0x2a], 0xff
mov byte [ebp - 0x29], 0
mov byte [ebp - 0x28], 0
mov byte [ebp - 0x27], 0
mov byte [ebp - 0x26], 0
mov byte [ebp - 0x25], 0
lea ecx, [ebp - 0x30]
push ecx
call dword [sym.imp.GDI32.dll_CreatePalette]
mov edx, dword [ebp + 0xc]
mov ecx, dword [edx + 0x10]
mov dword [ecx + 0x89c], eax
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x10]
mov ecx, dword [ebp - 0x2c]
mov dword [eax + 0x14], ecx
mov dword [ebp - 0x10], 1
jmp 0x40cbba
mov edx, dword [ebp - 0x10]
add edx, 1
mov dword [ebp - 0x10], edx
cmp dword [ebp - 0x10], 0x100
jge 0x40cbd5
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x10]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x28]
mov dword [ecx + edx*8 + 0x14], eax
jmp 0x40cbb1
push 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x10]
mov eax, dword [edx + 0x89c]
push eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x10]
mov eax, dword [edx + 0x8a0]
push eax
call dword [sym.imp.GDI32.dll_SelectPalette]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x10]
mov eax, dword [edx + 0x8a0]
push eax
call dword [sym.imp.GDI32.dll_RealizePalette]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x10]
mov dword [edx + 0x10], 1
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x10]
mov dword [ecx + 0x18], 1
mov dword [ebp - 0x10], 2
jmp 0x40cc36
mov edx, dword [ebp - 0x10]
add edx, 1
mov dword [ebp - 0x10], edx
cmp dword [ebp - 0x10], 0x100
jge 0x40cc52
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x10]
mov edx, dword [ebp - 0x10]
mov dword [ecx + edx*8 + 0x10], 0
jmp 0x40cc2d
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x10]
mov dword [ecx + 0x818], 1
push 0x1000001
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x10]
mov edx, dword [ecx + 0x8a0]
push edx
call dword [sym.imp.GDI32.dll_SelectObject]
push 0x1000001
push 1
push 0
call dword [sym.imp.GDI32.dll_CreatePen]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
push eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x10]
mov eax, dword [edx + 0x8a0]
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
push 0x1000001
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x10]
mov eax, dword [edx + 0x8a0]
push eax
call dword [sym.imp.GDI32.dll_SetTextColor]
push 1
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x10]
mov eax, dword [edx + 0x8a0]
push eax
call dword [sym.imp.GDI32.dll_SetBkMode]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x10]
mov dword [edx + 0x81c], 0
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x10]
mov dword [ecx + 0x820], 0xd
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x10]
mov dword [eax + 0x824], 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x10]
mov dword [edx + 0x828], 0
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x10]
add ecx, 0x814
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x10]
add eax, 0x82c
mov edx, dword [ecx]
mov dword [eax], edx
mov edx, dword [ecx + 4]
mov dword [eax + 4], edx
mov edx, dword [ecx + 8]
mov dword [eax + 8], edx
mov edx, dword [ecx + 0xc]
mov dword [eax + 0xc], edx
mov edx, dword [ecx + 0x10]
mov dword [eax + 0x10], edx
mov ecx, dword [ecx + 0x14]
mov dword [eax + 0x14], ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x10]
mov dword [eax + 0x8e8], 0
cmp dword [0x43f01c], 1
jne 0x40cdc7
mov dword [ebp - 0x10], 0
jmp 0x40cd81
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
cmp dword [ebp - 0x10], 0x11
jge 0x40cdc7
mov edx, dword [ebp - 0x10]
lea eax, [edx*4 + 0x430700]
push eax
push 1
push 1
push 4
push 4
call dword [sym.imp.GDI32.dll_CreateBitmap]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x40cdab
jmp 0x40cd78
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.GDI32.dll_CreatePatternBrush]
mov edx, dword [ebp + 0xc]
mov ecx, dword [edx + 0x10]
mov edx, dword [ebp - 0x10]
mov dword [ecx + edx*4 + 0x8a4], eax
jmp 0x40cd78
mov dword [ebp - 0x34], 0
jmp 0x40cdd9
mov eax, dword [ebp - 0x34]
add eax, 1
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x34]
cmp ecx, dword [ebp + 0x10]
jge 0x40d18c
mov edx, dword [ebp - 0x34]
imul edx, edx, 0x28
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax + edx]
mov dword [ebp - 0x50], ecx
mov edx, dword [ebp - 0x50]
sub edx, 7
mov dword [ebp - 0x50], edx
cmp dword [ebp - 0x50], 6
ja case.0x40ce0a.1
mov eax, dword [ebp - 0x50]
jmp dword [eax*4 + 0x40d1fc]
push 0x4307c4
mov ecx, dword [ebp - 0x34]
imul ecx, ecx, 0x28
mov edx, dword [ebp + 0x14]
mov eax, dword [edx + ecx + 8]
push eax
call sub.MSVCR90.dll_strcmp
add esp, 8
test eax, eax
jne 0x40ce4c
mov dword [0x4306fc], 1
push 0x7f02
push 0
call dword [sym.imp.USER32.dll_LoadCursorA]
mov dword [ebp - 0x1c], eax
jmp 0x40ceb1
push 0x4307cc
mov ecx, dword [ebp - 0x34]
imul ecx, ecx, 0x28
mov edx, dword [ebp + 0x14]
mov eax, dword [edx + ecx + 8]
push eax
call sub.MSVCR90.dll_strcmp
add esp, 8
test eax, eax
jne 0x40ce87
mov dword [0x4306fc], 0xffffffff
push 0x7f00
push 0
call dword [sym.imp.USER32.dll_LoadCursorA]
mov dword [ebp - 0x1c], eax
jmp 0x40ceb1
mov ecx, dword [ebp - 0x34]
imul ecx, ecx, 0x28
mov edx, dword [ebp + 0x14]
mov eax, dword [edx + ecx + 8]
push eax
push 0xf
push 0xc8
push 0x4307d4
call fcn.0040b010
add esp, 0x10
or eax, 0xffffffff
jmp 0x40d1b8
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.USER32.dll_SetCursor]
jmp case.0x40ce0a.1
mov edx, dword [ebp - 0x34]
imul edx, edx, 0x28
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax + edx + 8]
mov dword [ebp - 4], ecx
cmp dword [ebp - 4], 0
jl 0x40cedf
cmp dword [ebp - 4], 0x100
jle 0x40ceff
mov edx, dword [ebp - 4]
push edx
push 3
push 0xd0
push 0x4307ec
call fcn.0040b010
add esp, 0x10
or eax, 0xffffffff
jmp 0x40d1b8
mov eax, dword [ebp - 0x34]
imul eax, eax, 0x28
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x10]
mov ecx, dword [ebp - 4]
mov esi, dword [ebp + 0x14]
mov al, byte [esi + eax + 0xc]
mov byte [edx + ecx*8 + 0x14], al
mov ecx, dword [ebp - 0x34]
imul ecx, ecx, 0x28
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x10]
mov edx, dword [ebp - 4]
mov esi, dword [ebp + 0x14]
mov cl, byte [esi + ecx + 0x10]
mov byte [eax + edx*8 + 0x15], cl
mov edx, dword [ebp - 0x34]
imul edx, edx, 0x28
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x10]
mov eax, dword [ebp - 4]
mov esi, dword [ebp + 0x14]
mov dl, byte [esi + edx + 0x14]
mov byte [ecx + eax*8 + 0x16], dl
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x10]
mov edx, dword [ebp - 4]
mov byte [ecx + edx*8 + 0x17], 0
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x10]
mov edx, dword [ebp - 4]
cmp edx, dword [ecx + 0x8ec]
jl 0x40cf98
mov eax, dword [ebp - 4]
add eax, 1
push eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x10]
mov eax, dword [edx + 0x89c]
push eax
call dword [sym.imp.GDI32.dll_ResizePalette]
mov ecx, dword [ebp - 4]
add ecx, 1
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x10]
mov dword [eax + 0x8ec], ecx
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x10]
mov eax, dword [ebp - 4]
lea ecx, [edx + eax*8 + 0x14]
push ecx
push 1
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x10]
mov edx, dword [ecx + 0x89c]
push edx
call dword [sym.imp.GDI32.dll_SetPaletteEntries]
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x10]
mov edx, dword [ecx + 0x8a0]
push edx
call dword [sym.imp.GDI32.dll_RealizePalette]
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x10]
mov edx, dword [ebp - 4]
mov dword [ecx + edx*8 + 0x10], 1
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x10]
mov edx, dword [ebp - 4]
cmp edx, dword [ecx + 0x818]
jne 0x40d004
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x10]
mov dword [ecx + 0x818], 0xffffffff
jmp case.0x40ce0a.1
mov edx, dword [ebp - 0x34]
imul edx, edx, 0x28
mov eax, dword [ebp + 0x14]
fldz
fcomp qword [eax + edx + 8]
fnstsw ax
test ah, 0x44
jp 0x40d02e
mov ecx, dword [ebp - 0x34]
imul ecx, ecx, 0x28
mov edx, dword [ebp + 0x14]
fld1
fstp qword [edx + ecx + 8]
mov eax, dword [ebp - 0x34]
imul eax, eax, 0x28
mov ecx, dword [ebp + 0x14]
fldz
fcomp qword [ecx + eax + 0x10]
fnstsw ax
test ah, 0x44
jp 0x40d053
mov edx, dword [ebp - 0x34]
imul edx, edx, 0x28
mov eax, dword [ebp + 0x14]
fld1
fstp qword [eax + edx + 0x10]
mov ecx, dword [ebp - 0x34]
imul ecx, ecx, 0x28
mov edx, dword [ebp + 0x14]
fld qword [edx + ecx + 8]
fadd qword [0x42d728]
call fcn.0042b990
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x10]
mov dword [ebp - 0x54], eax
fild dword [ebp - 0x54]
fstp qword [edx + 0x868]
mov eax, dword [ebp - 0x34]
imul eax, eax, 0x28
mov ecx, dword [ebp + 0x14]
fld qword [ecx + eax + 0x10]
fadd qword [0x42d728]
call fcn.0042b990
mov edx, dword [ebp + 0xc]
mov ecx, dword [edx + 0x10]
mov dword [ebp - 0x58], eax
fild dword [ebp - 0x58]
fstp qword [ecx + 0x870]
push 0x16
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x10]
fld qword [eax + 0x870]
call fcn.0042b990
push eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x10]
fld qword [edx + 0x868]
call fcn.0042b990
push eax
push 0
push 0
push 0
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0xc]
push ecx
call dword [sym.imp.USER32.dll_SetWindowPos]
jmp case.0x40ce0a.1
mov edx, dword [ebp - 0x34]
imul edx, edx, 0x28
mov eax, dword [ebp - 0x34]
imul eax, eax, 0x28
mov ecx, dword [ebp + 0x14]
mov esi, dword [ebp + 0x14]
fld qword [esi + eax + 0x18]
fcomp qword [ecx + edx + 8]
fnstsw ax
test ah, 0x44
jp 0x40d126
mov edx, dword [ebp - 0x34]
imul edx, edx, 0x28
mov eax, dword [ebp + 0x14]
fld qword [eax + edx + 8]
fadd qword [0x42d740]
mov ecx, dword [ebp - 0x34]
imul ecx, ecx, 0x28
mov edx, dword [ebp + 0x14]
fstp qword [edx + ecx + 0x18]
mov eax, dword [ebp - 0x34]
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x34]
imul ecx, ecx, 0x28
mov edx, dword [ebp + 0x14]
mov esi, dword [ebp + 0x14]
fld qword [esi + ecx + 0x20]
fcomp qword [edx + eax + 0x10]
fnstsw ax
test ah, 0x44
jp 0x40d167
mov eax, dword [ebp - 0x34]
imul eax, eax, 0x28
mov ecx, dword [ebp + 0x14]
fld qword [ecx + eax + 0x10]
fadd qword [0x42d740]
mov edx, dword [ebp - 0x34]
imul edx, edx, 0x28
mov eax, dword [ebp + 0x14]
fstp qword [eax + edx + 0x20]
mov ecx, dword [ebp - 0x34]
imul ecx, ecx, 0x28
mov edx, dword [ebp + 0x14]
lea esi, [edx + ecx + 8]
mov eax, dword [ebp + 0xc]
mov edi, dword [eax + 0x10]
add edi, 0x848
mov ecx, 8
rep movsd dword es:[edi], dword [esi]
jmp 0x40cdd0
cmp dword [ebp + 8], 0
je 0x40d1aa
mov ecx, dword [ebp + 8]
cmp dword [ecx], 0
jne 0x40d1aa
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0040bd80
add esp, 8
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00411710
add esp, 4
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret