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

Disassembly:
sub esp, 0x194
push ebx
push ebp
push esi
mov esi, dword [esp + 0x1a4]
push edi
mov ebx, ecx
mov eax, dword [esi + 0x34]
cmp word [eax + 0xe], 0
jne 0x498c2d
cmp word [0x65d82c], 0
je 0x498c2d
mov eax, dword [eax + 0x14]
mov edi, dword [sym.imp.USER32.dll_PeekMessageA]
push 2
push 0x108
push 0x100
lea ecx, [esp + 0xb0]
push eax
push ecx
call edi
test eax, eax
jne 0x498bb4
mov edx, dword [esi + 0x34]
push 2
push 0x209
push 0x200
mov eax, dword [edx + 0x14]
lea ecx, [esp + 0xb0]
push eax
push ecx
call edi
test eax, eax
je 0x498c20
mov edx, dword [esi + 0x34]
push 2
push 0x100
push 0x100
mov eax, dword [edx + 0x14]
lea ecx, [esp + 0xb0]
push eax
push ecx
call edi
cmp dword [esp + 0xa8], 0x100
jne 0x498be8
cmp dword [esp + 0xac], 0x1b
je 0x498c09
mov edx, dword [esi + 0x34]
push 2
push 0x204
push 0x204
mov eax, dword [edx + 0x14]
lea ecx, [esp + 0xb0]
push eax
push ecx
call edi
test eax, eax
je 0x498c20
mov eax, 1
mov dword [0x654304], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x194
ret 8
mov eax, dword [0x654304]
test eax, eax
jne 0x499612
mov ebp, dword [esi + 0x34]
mov edx, dword [ebp + 0x10]
push edx
call dword [sym.imp.GDI32.dll_GetBkMode]
mov ecx, dword [esi + 0x34]
mov dword [esp + 0x88], eax
mov eax, dword [ebx + 0x41c]
push eax
push ecx
mov ecx, ebx
call fcn.004a8400
mov edx, dword [ebx + 0x420]
mov dword [esp + 0x4c], eax
mov eax, dword [esi + 0x34]
push edx
push eax
mov ecx, ebx
call fcn.00489bc0
mov ecx, dword [ebx + 0x3f4]
mov edx, dword [ebx + 0x3f8]
mov dword [esp + 0x2c], eax
mov eax, dword [ebx + 0x41c]
mov dword [esp + 0x40], eax
mov eax, dword [ebx + 0x418]
mov dword [esp + 0x74], ecx
lea ecx, [ebx + 0xbc]
push eax
mov dword [esp + 0x6c], edx
mov dword [esp + 0x9c], eax
mov dword [esp + 0xa0], ecx
call fcn.00485250
cmp word [eax + 4], 0
mov dword [esp + 0x1c], eax
je 0x498ccd
xor ecx, ecx
mov dword [esp + 0x54], 1
mov cx, word [eax + 6]
cmp word [eax + ecx*8 + 8], 0x7f87
je 0x498cd5
mov dword [esp + 0x54], 0
mov eax, dword [ebx + 0x40c]
mov edx, dword [ebx + 0x424]
push eax
mov ecx, ebx
mov dword [esp + 0x48], edx
call fcn.00481a50
mov edi, dword [esp + 0x54]
mov edx, dword [esp + 0x4c]
mov ecx, dword [ebx + 0x410]
neg edi
sbb edi, edi
not edi
and edi, edx
mov edx, dword [eax + 8]
mov eax, dword [esp + 0x54]
sub edi, ecx
mov ecx, dword [esp + 0x44]
sub edi, edx
add edi, ecx
test eax, eax
mov dword [esp + 0x18], edi
je 0x498d20
xor ecx, ecx
jmp 0x498d2a
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x4c]
add ecx, edx
mov eax, dword [ebx + 0x428]
mov edx, dword [esp + 0x44]
sub eax, edx
sub eax, ecx
cmp word [ebp + 0xe], 0
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x1ac]
mov cx, word [eax + 0x10]
mov word [esp + 0x38], cx
je 0x498d5b
and dword [esp + 0x38], 0xfffe
mov edx, dword [esp + 0x40]
mov ecx, ebx
push edx
call fcn.004af580
test byte [esp + 0x38], 0x10
je 0x498db7
mov eax, dword [esp + 0x1c]
xor edi, edi
cmp word [eax + 6], di
jbe 0x4995cb
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x18]
mov ebx, eax
lea ebp, [ecx + edx]
mov edx, dword [esp + 0x18]
mov eax, edi
and eax, 0xffff
push 0
push ebp
mov ecx, dword [ebx + eax*8 + 0xc]
mov eax, dword [ebx + eax*8 + 8]
push ecx
push edx
push eax
mov ecx, esi
call fcn.0049dfa0
inc edi
cmp di, word [ebx + 6]
jb 0x498d8b
jmp 0x4995cb
mov ecx, dword [esp + 0x1ac]
xor eax, eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov edx, dword [ecx]
mov ecx, dword [esp + 0x54]
cmp edx, eax
je 0x4991ce
cmp ecx, eax
jne 0x499282
cmp dword [ebp + 0x240], eax
jne 0x4991d6
mov edx, dword [ebp + 4]
mov ecx, dword [ebp + 8]
mov dword [esp + 0x6c], edx
mov edx, dword [ebp + 0x10]
mov dword [esp + 0x70], ecx
mov ecx, dword [esp + 0x24]
mov dword [ebp + 4], eax
mov eax, edi
mov dword [esp + 0x78], edx
add ecx, edi
neg eax
lea edx, [esi + 0x38]
mov dword [ebp + 8], eax
mov dword [esp + 0xb0], ecx
mov ecx, dword [edx]
mov dword [esp + 0x58], ecx
mov ecx, dword [edx + 4]
mov dword [esp + 0x5c], ecx
mov ecx, dword [edx + 8]
mov edx, dword [edx + 0xc]
mov dword [esp + 0x64], edx
mov edx, dword [esp + 0x58]
test edx, edx
jge 0x498e40
mov dword [esp + 0x58], 0
cmp dword [esp + 0x5c], edi
jge 0x498e4a
mov dword [esp + 0x5c], edi
cmp ecx, 0x3fffffff
jle 0x498e57
mov ecx, 0x3fffffff
mov edi, dword [esp + 0xb0]
mov edx, dword [esp + 0x64]
cmp edx, edi
jle 0x498e6c
mov edx, edi
mov dword [esp + 0x64], edx
mov edi, dword [esp + 0x58]
cmp ecx, edi
jge 0x498e76
mov ecx, edi
mov edi, dword [esp + 0x5c]
cmp edx, edi
jge 0x498e82
mov dword [esp + 0x64], edi
mov edx, dword [esp + 0x58]
mov edi, edx
sub ecx, edx
neg edi
mov dword [ebp + 4], edi
mov edi, dword [esp + 0x5c]
sub eax, edi
add eax, dword [esp + 0x18]
mov dword [ebp + 8], eax
mov ax, word [ebp + 0xc]
push eax
push ecx
call fcn.004021e0
mov cx, word [ebp + 0xc]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x6c]
push ecx
sub eax, edi
push eax
call fcn.004021e0
mov edx, dword [ebp + 0x14]
add esp, 0x10
mov dword [esp + 0x34], eax
push edx
call dword [sym.imp.USER32.dll_GetDC]
push eax
mov dword [esp + 0x30], eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov ecx, dword [ebp + 0x14]
mov edi, eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x4c], edi
push eax
push ecx
call dword [sym.imp.USER32.dll_ReleaseDC]
mov edx, dword [ebp + 0x10]
push edx
call dword [sym.imp.GDI32.dll_GetTextAlign]
push eax
push edi
call dword [sym.imp.GDI32.dll_SetTextAlign]
push 1
push edi
call dword [sym.imp.GDI32.dll_SetBkMode]
cmp word [esi], 1
jne 0x498f7e
mov cx, word [ebp + 0xc]
mov edx, dword [esp + 0x34]
mov eax, dword [ebp + 4]
push ecx
push edx
mov dword [esp + 0x34], eax
call fcn.004017f0
mov ecx, dword [esi + 4]
mov edx, dword [ebp + 8]
sub eax, ecx
mov ecx, dword [esp + 0x3c]
sub eax, edx
mov edx, dword [ebp + 0x264]
mov dword [ebp + 4], eax
mov eax, dword [esp + 0x34]
mov dword [ebp + 8], eax
mov eax, dword [esp + 0x58]
add edx, eax
mov ax, word [ebp + 0xc]
mov dword [esp + 0x58], ecx
mov ecx, dword [ebp + 0x260]
push eax
push ecx
mov dword [esp + 0x44], edx
call fcn.004017f0
mov edx, dword [ebp + 4]
mov ecx, eax
mov eax, dword [esp + 0x7c]
add esp, 0x10
sub eax, edx
mov edx, dword [esp + 0x34]
add eax, edx
cdq
idiv ecx
add dword [esp + 0x34], edx
jmp 0x498fc0
mov dx, word [ebp + 0xc]
mov eax, dword [ebp + 0x264]
push edx
push eax
call fcn.004017f0
mov edx, dword [ebp + 8]
mov ecx, eax
mov eax, dword [esp + 0x78]
add esp, 8
sub eax, edx
mov edx, dword [esp + 0x34]
add eax, edx
cdq
idiv ecx
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x50]
add ecx, edx
mov edx, dword [ebp + 0x260]
add eax, edx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x50], eax
mov cx, word [ebp + 0xc]
mov edx, dword [ebp + 0x260]
mov eax, dword [ebp + 4]
push ecx
push edx
mov dword [esp + 0x1c], eax
call fcn.004017f0
mov edx, dword [esp + 0x1c]
mov ecx, eax
mov eax, dword [esp + 0x74]
sub eax, edx
cdq
idiv ecx
mov eax, dword [esp + 0x1c]
mov ecx, dword [ebp + 0x264]
add edx, eax
mov ax, word [ebp + 0xc]
mov dword [ebp + 4], edx
mov edx, dword [ebp + 8]
push eax
push ecx
mov dword [esp + 0x24], edx
call fcn.004017f0
mov edx, dword [esp + 0x24]
mov ecx, eax
mov eax, dword [esp + 0x80]
add esp, 0x10
sub eax, edx
cdq
idiv ecx
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x50]
add edx, ecx
mov dword [ebp + 8], edx
cdq
idiv dword [ebp + 0x260]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x34]
cdq
idiv dword [ebp + 0x264]
test edi, edi
mov dword [esp + 0x84], eax
je 0x499098
push 0
push 0xc
push edi
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
push eax
push 0xe
push edi
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov edx, dword [esp + 0x8c]
push eax
mov eax, dword [esp + 0x8c]
push edx
push eax
call dword [sym.imp.GDI32.dll_CreateBitmap]
test eax, eax
mov dword [esp + 0x48], eax
je 0x499098
mov ecx, eax
push ecx
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0xa0], eax
mov dword [ebp + 0x10], edi
jmp 0x4990ad
mov edx, dword [esp + 0x6c]
mov eax, dword [esp + 0x70]
mov dword [ebp + 4], edx
push edi
mov dword [ebp + 8], eax
call dword [sym.imp.GDI32.dll_DeleteDC]
mov ecx, dword [esp + 0x80]
mov edx, dword [esp + 0x84]
xor eax, eax
mov dword [esp + 0xc8], ecx
push eax
push eax
mov dword [esp + 0xc8], eax
mov dword [esp + 0xcc], eax
push eax
mov eax, dword [ebp + 0x10]
push eax
mov dword [esp + 0xdc], edx
call dword [sym.imp.GDI32.dll_SetBrushOrgEx]
cmp word [esi + 0x32], 0
mov dword [esp + 0x14], 0
je 0x49915b
mov ax, word [esi + 0x2c]
mov edx, dword [ebp]
push 0x3e8
push eax
mov ecx, ebp
call dword [edx]
xor ecx, ecx
push eax
mov cx, word [esi + 0x32]
dec ecx
push ecx
call dword [sym.imp.GDI32.dll_CreateHatchBrush]
mov edx, dword [esp + 0x78]
mov dword [esp + 0x28], eax
push edx
call dword [sym.imp.GDI32.dll_GetBkMode]
cmp eax, 1
je 0x499171
mov cx, word [esi + 0x2e]
mov eax, dword [ebp]
push 0x3e8
push ecx
mov ecx, ebp
call dword [eax]
mov edx, dword [ebp + 0x10]
push eax
push edx
call dword [sym.imp.GDI32.dll_SetBkColor]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x10]
push 2
push eax
call dword [sym.imp.GDI32.dll_SetBkMode]
mov dword [esp + 0x2c], eax
jmp 0x499171
mov ecx, dword [esp + 0x78]
push ecx
call dword [sym.imp.GDI32.dll_GetBkColor]
push eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
mov dword [esp + 0x28], eax
mov edx, dword [esp + 0x28]
push edx
call dword [sym.imp.GDI32.dll_UnrealizeObject]
mov eax, dword [esp + 0x28]
mov edx, dword [ebp + 0x10]
lea ecx, [esp + 0xc0]
push eax
push ecx
push edx
call dword [sym.imp.USER32.dll_FillRect]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4991b5
mov ecx, dword [ebp + 0x10]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetBkColor]
mov edx, dword [esp + 0x2c]
mov eax, dword [ebp + 0x10]
push edx
push eax
call dword [sym.imp.GDI32.dll_SetBkMode]
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [esp + 0x48]
test eax, eax
jne 0x4992ad
jmp 0x4991da
cmp ecx, eax
jne 0x499282
mov edi, dword [esp + 0x4c]
mov eax, dword [esi + 0x10]
test eax, eax
je 0x499286
cmp word [esi], 0
jne 0x499209
mov eax, dword [esi + 0x40]
mov edx, dword [esi + 0x38]
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x58], edx
mov dword [esp + 0x5c], eax
add ecx, eax
jmp 0x49922e
mov eax, dword [esi + 4]
mov ecx, dword [esp + 0x18]
mov edx, eax
sub edx, ecx
mov dword [esp + 0x60], edx
mov edx, dword [esp + 0x24]
sub eax, edx
sub eax, ecx
mov ecx, dword [esi + 0x40]
mov dword [esp + 0x58], eax
mov eax, dword [esi + 0x38]
mov dword [esp + 0x5c], eax
lea edx, [esp + 0x58]
mov dword [esp + 0x64], ecx
push edx
mov ecx, ebp
call fcn.00439ec0
push 0
push 0
push 0
push 0
mov dword [esp + 0x24], eax
call dword [sym.imp.GDI32.dll_CreateRectRgn]
mov ecx, dword [esi + 0x10]
mov edx, dword [esp + 0x14]
push 1
push ecx
push edx
push eax
mov dword [esp + 0x54], eax
call dword [sym.imp.GDI32.dll_CombineRgn]
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, dword [esp + 0x44]
mov edx, dword [ebp + 0x10]
push ecx
push edx
call dword [sym.imp.GDI32.dll_SelectClipRgn]
jmp 0x499286
mov edi, dword [esp + 0x4c]
mov eax, dword [esp + 0x1ac]
cmp dword [eax], 0
je 0x4992ad
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x18]
mov edx, dword [esi + 0x40]
add ecx, eax
push ecx
push edx
push eax
mov eax, dword [esi + 0x38]
push eax
mov ecx, esi
call fcn.0049dcc0
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x30], 0
cmp word [ecx + 4], 0
jbe 0x499472
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x1c]
and eax, 0xffff
xor edx, edx
mov dx, word [ecx + 6]
mov dword [esp + 0x14], eax
lea eax, [eax + eax*2]
xor edi, edi
lea eax, [eax + eax*4]
lea ecx, [ecx + eax*2]
mov eax, dword [esp + 0x40]
mov di, word [ecx + edx*8 + 0xc]
lea esi, [ecx + edx*8 + 8]
add edi, eax
mov ecx, ebx
push edi
mov dword [esp + 0x30], esi
call fcn.004af580
mov eax, dword [ebx + 0x5ea]
mov edx, dword [eax]
mov eax, dword [eax + 0x10]
push edx
push eax
call fcn.00409040
mov edx, dword [ebx + 0x5ea]
mov cx, word [ebp + 0xc]
mov dword [esp + 0x30], eax
push ecx
mov eax, dword [edx]
push eax
call fcn.004021e0
mov ecx, dword [0x655aec]
add esp, 0x10
cmp eax, ecx
jg 0x499364
mov eax, dword [ebx + 0x130]
test eax, eax
jne 0x499364
cmp word [ebp + 0xe], 0
mov dword [esp + 0x20], 1
je 0x49935a
cmp word [0x655ab8], 2
jne 0x499364
mov eax, dword [ebp + 0x128]
test eax, eax
je 0x49936c
mov dword [esp + 0x20], 0
push edi
mov ecx, ebx
call fcn.004af580
xor eax, eax
mov ax, word [esi]
add eax, 0xffff8100
cmp eax, 0x8a
ja case.0x499391.32519
xor ecx, ecx
mov cl, byte [eax + 0x49a0b4]
jmp dword [ecx*4 + 0x49a094]
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x49942a
test byte [esp + 0x38], 1
je 0x49942a
mov edx, dword [esp + 0x30]
mov word [esi], 0x7f80
mov eax, dword [ebx + 0x5ea]
mov byte [esp + 0x13], 0xb6
push edx
lea ecx, [esp + 0x19c]
mov di, word [eax + 0xe]
mov word [eax + 0xe], 0
mov eax, dword [esp + 0x20]
mov dx, word [ebp + 0xc]
push eax
mov eax, dword [0x6559e0]
push ecx
push ebx
push edx
push ebp
call dword [eax + 0x1ee]
mov edx, dword [esp + 0x34]
add esp, 0x18
lea ecx, [esp + 0x13]
mov eax, dword [edx]
mov edx, dword [esp + 0x18]
push 1
push 0
push ecx
mov ecx, dword [esp + 0x34]
push eax
mov eax, dword [esi + 8]
add ecx, edx
push ecx
mov ecx, dword [esp + 0x1bc]
push eax
push 8
push 2
call fcn.0049e320
mov ecx, dword [ebx + 0x5ea]
mov word [ecx + 0xe], di
mov word [esi], 0x7f03
mov esi, dword [esi + 8]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
push 0
push 0
mov edx, dword [ecx]
mov ecx, dword [esp + 0x1b0]
push 0
push edx
push eax
push esi
push 8
push 2
call fcn.0049e320
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x1c]
inc eax
cmp ax, word [ecx + 4]
mov dword [esp + 0x30], eax
jb 0x4992c4
mov esi, dword [esp + 0x1a8]
mov edi, dword [esp + 0x4c]
mov eax, dword [esp + 0x48]
test eax, eax
je 0x499526
mov eax, dword [esp + 0x34]
push 0xcc0020
cdq
idiv dword [ebp + 0x264]
push 0
push 0
push edi
push eax
mov eax, dword [esp + 0x64]
cdq
idiv dword [ebp + 0x260]
mov dx, word [ebp + 0xc]
push eax
mov eax, dword [esp + 0x88]
push edx
mov edx, dword [ebp + 8]
sub eax, edx
push eax
call fcn.004021e0
cdq
idiv dword [ebp + 0x264]
mov cx, word [ebp + 0xc]
mov edx, dword [esp + 0x8c]
add esp, 8
push eax
push ecx
sub edx, dword [ebp + 4]
push edx
call fcn.004021e0
cdq
idiv dword [ebp + 0x260]
add esp, 8
push eax
mov eax, dword [esp + 0x98]
push eax
call dword [sym.imp.GDI32.dll_BitBlt]
mov ecx, dword [esp + 0xa0]
push ecx
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
mov edx, dword [esp + 0x48]
push edx
call dword [sym.imp.GDI32.dll_DeleteObject]
push edi
call dword [sym.imp.GDI32.dll_DeleteDC]
mov ecx, dword [esp + 0x6c]
mov eax, dword [esp + 0x78]
mov edx, dword [esp + 0x70]
mov dword [ebp + 4], ecx
mov dword [ebp + 0x10], eax
mov dword [ebp + 8], edx
mov eax, dword [esp + 0x44]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, dword [esi + 0x10]
mov edx, dword [ebp + 0x10]
push ecx
push edx
call dword [sym.imp.GDI32.dll_SelectClipRgn]
mov eax, dword [esp + 0x54]
test eax, eax
jne 0x4995cb
cmp word [ebx + 0x452], 0
je 0x499589
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x40]
cmp ecx, eax
jne 0x499589
mov ecx, dword [esp + 0x1c]
cmp word [ecx + 4], 0
je 0x499589
mov edx, dword [esp + 0x1ac]
mov ecx, dword [ebx + 0x400]
mov eax, dword [edx]
push eax
push 0x7f9a
push ecx
mov ecx, esi
call fcn.0049e470
cmp word [ebx + 0x454], 0
je 0x4995cb
mov edx, dword [ebx + 0x420]
mov eax, dword [ebx + 0x3fc]
cmp edx, eax
jne 0x4995cb
mov eax, dword [esp + 0x1c]
cmp word [eax + 4], 0
je 0x4995cb
mov ecx, dword [esp + 0x1ac]
mov eax, dword [ebx + 0x400]
mov edx, dword [ecx]
mov ecx, esi
push edx
push 0x7f9b
push eax
call fcn.0049e470
mov ecx, dword [esp + 0x98]
push ecx
mov ecx, dword [esp + 0xa0]
call fcn.00485270
cmp word [0x655ab8], 0
je 0x49960f
mov edx, dword [esp + 0x1ac]
mov eax, dword [esp + 0x40]
mov ecx, dword [0x655c22]
sub eax, dword [edx + 0xc]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea edx, [ecx + eax*2]
push edx
call fcn.004ceb90
add esp, 4
xor ax, ax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x194
ret 8
mov eax, dword [ebx + 0x400]
lea edx, [esp + 0x120]
push edx
push 0x7f40
push eax
push ebp
mov ecx, ebx
call fcn.0048e440
mov ecx, dword [ebx + 0x40c]
xor esi, esi
push ecx
call fcn.00433030
add esp, 4
cmp word [ebx + 0x96], ax
jne 0x4996b2
mov eax, dword [ebx + 0x400]
lea edx, [esp + 0x12c]
push edx
push eax
mov word [esp + 0x134], 0x7f40
mov word [esp + 0x136], 0x7e0e
call fcn.00453820
add esp, 8
test eax, eax
je 0x4996b2
cmp word [esp + 0x130], si
jne 0x4996b2
mov edx, dword [ebx + 0x400]
lea ecx, [esp + 0x12c]
mov esi, 1
push ecx
push edx
mov word [esp + 0x138], si
call fcn.004539d0
add esp, 8
mov eax, dword [ebx + 0x130]
test eax, eax
je 0x4996c4
mov eax, dword [ebx + 0x5ee]
jmp 0x4996c6
mov eax, ebp
mov ecx, dword [esp + 0x48]
mov edi, dword [esp + 0x44]
mov edx, dword [ebx + 0x400]
neg ecx
sbb ecx, ecx
not ecx
and ecx, edi
push ecx
push edx
push eax
call fcn.0045b0b0
add esp, 0xc
cmp word [0x655ab8], 0
je 0x499729
mov eax, dword [ebx + 0x400]
push eax
push 0
push 0x5b
push 5
push ebp
call fcn.0042f060
mov ecx, eax
mov eax, 0xae147ae1
imul ecx
mov eax, dword [esp + 0x1c0]
add esp, 0x14
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
mov ecx, dword [eax + 0xc]
add ecx, edx
mov dword [eax + 0xc], ecx
test esi, esi
je 0x49974e
mov eax, dword [ebx + 0x400]
lea edx, [esp + 0x12c]
push edx
push eax
mov word [esp + 0x138], 0
call fcn.004539d0
add esp, 8
mov edx, dword [ebx + 0x400]
lea ecx, [esp + 0x120]
push ecx
push edx
call fcn.0048e570
add esp, 8
jmp case.0x499391.32518
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0xc]
cmp eax, ecx
je case.0x499391.32518
mov eax, dword [esp + 0x40]
push 0
push eax
push eax
mov ecx, ebx
call fcn.0049e6d0
mov cx, word [ebx + 0x3b4]
xor edx, edx
test cx, cx
sete dl
cmp word [ebx + 0x5d2], 0
mov dword [esp + 0x28], edx
jne 0x4997aa
mov eax, dword [esp + 0x14]
jmp 0x4997ba
mov edi, dword [esp + 0x14]
xor eax, eax
mov ax, word [ebx + 0x3ba]
sub eax, edi
dec eax
mov dx, word [ebx + 0x3ba]
imul dx, cx
add dx, word [ebx + 0x3bc]
mov ecx, ebx
add edx, eax
push edx
call fcn.00488030
push eax
mov dword [esp + 0x94], eax
call fcn.004952e0
add esp, 4
mov ecx, ebx
push eax
call fcn.00487210
push eax
mov ecx, ebx
call fcn.004af6d0
mov ax, word [ebx + 0x5c6]
test ax, ax
mov dword [esp + 0x2c], eax
je 0x499812
mov eax, dword [ebx + 0x5de]
mov dword [esp + 0x20], eax
jmp 0x49981a
mov dword [esp + 0x20], 0
mov di, word [ebx + 0x5ca]
mov cx, word [ebx + 0x5c8]
mov dx, word [ebx + 0x5cc]
mov word [esp + 0x3c], cx
test di, di
mov word [esp + 0x7c], dx
je 0x4998ac
mov ecx, dword [esp + 0x1c]
xor eax, eax
mov ax, word [ecx + 4]
mov ecx, dword [esp + 0x14]
dec eax
cmp ecx, eax
jne 0x499855
xor ecx, ecx
jmp 0x499862
mov eax, dword [ebx + 0x5b8]
cdq
sub eax, edx
mov ecx, eax
sar ecx, 1
cmp word [esp + 0x30], 0
je 0x499877
mov eax, dword [ebx + 0x5b8]
cdq
sub eax, edx
sar eax, 1
jmp 0x499879
xor eax, eax
mov dx, word [ebx + 0x5ce]
push 0
push 0
push edx
mov edx, dword [esp + 0x30]
push edi
mov edi, dword [esp + 0x28]
add edx, edi
push edx
mov edx, dword [esi + 0xc]
add ecx, edx
push ecx
mov ecx, dword [esi + 8]
sub ecx, eax
push edi
push ecx
mov ecx, dword [esp + 0x1c8]
call fcn.0049ddc0
jmp 0x4998d8
mov eax, dword [esp + 0x88]
mov edi, dword [esp + 0x18]
cmp eax, 1
je 0x4998d8
mov edx, dword [esp + 0x24]
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 8]
add edx, edi
push edx
push eax
push edi
push ecx
mov ecx, dword [esp + 0x1b8]
call fcn.0049dcc0
cmp word [ebp + 0xe], 0
jne 0x499966
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x499966
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4998f7
xor eax, eax
jmp 0x49990b
mov dx, word [ebp + 0xc]
mov eax, dword [ebp + 0x264]
push edx
push eax
call fcn.004017f0
add esp, 8
mov ecx, edi
sub ecx, eax
cmp word [esp + 0x30], 0
mov dword [esp + 0x14], ecx
je 0x499933
mov cx, word [ebp + 0xc]
mov edx, dword [ebp + 0x260]
push ecx
push edx
call fcn.004017f0
add esp, 8
mov ecx, eax
jmp 0x499935
xor ecx, ecx
mov eax, dword [ebx + 0x5b8]
cdq
sub eax, edx
mov edx, dword [esp + 0x24]
add edx, edi
sar eax, 1
push edx
mov edx, eax
add edx, dword [esi + 0xc]
push edx
mov edx, dword [esp + 0x1c]
push edx
mov edx, dword [esi + 8]
sub edx, eax
sub edx, ecx
mov ecx, dword [esp + 0x1b4]
push edx
call fcn.0049e120
mov ecx, dword [esp + 0x90]
mov ax, word [esp + 0x30]
push 0
push 0x3fffffff
push 0
push ecx
push ebp
mov ecx, ebx
mov word [ebx + 0x3b6], ax
call fcn.0049a200
cmp word [esp + 0x2c], 0
je 0x499a08
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4999a5
mov dword [esp + 0x14], 0
jmp 0x4999b2
mov eax, dword [esp + 0x20]
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x5b8]
mov edx, dword [esp + 0x20]
add eax, edx
cdq
sub eax, edx
mov edx, dword [esp + 0x7c]
mov ecx, eax
mov eax, dword [esp + 0x3c]
push edx
mov edx, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x28]
push eax
push edx
cdq
sub eax, edx
mov edx, dword [esp + 0x34]
sar eax, 1
add eax, edx
mov edx, dword [esi + 0xc]
add eax, edi
sar ecx, 1
push eax
mov eax, ecx
add eax, edx
mov edx, dword [esp + 0x28]
sub edi, edx
mov edx, dword [esi + 8]
push eax
sub edx, ecx
mov ecx, dword [esp + 0x1c0]
push edi
push edx
call fcn.0049de80
mov ecx, ebx
call fcn.0049eb50
jmp case.0x499391.32518
mov eax, dword [esp + 0x20]
test eax, eax
je 0x499a40
mov cx, word [esi + 0x10]
mov eax, ecx
and eax, 0xffff
add eax, 0x73
lea eax, [eax + eax*4]
cmp dword [ebx + eax*2], 0
je 0x499a40
cmp cx, word [ebx + 0x456]
jb case.0x499391.32513
test byte [esp + 0x38], 8
je 0x499ac6
mov ax, word [esi + 0x10]
cmp ax, word [ebx + 0x456]
jae 0x499ac6
and eax, 0xffff
add eax, 0x73
lea ecx, [eax + eax*4]
cmp dword [ebx + ecx*2], 0
je 0x499ac6
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x1c]
push edx
lea ecx, [esp + 0x190]
mov word [esi], 0x7f80
mov dx, word [ebp + 0xc]
push eax
mov eax, dword [0x6559e0]
push ecx
push ebx
push edx
push ebp
call dword [eax + 0x1ee]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esi + 0xc]
mov eax, dword [esp + 0x30]
add esp, 0x18
push ecx
push edx
push eax
xor eax, eax
mov ax, word [esi + 0x10]
mov ecx, dword [esi + 8]
add eax, 0x73
push ecx
mov ecx, dword [esp + 0x1b8]
lea edx, [eax + eax*4]
mov eax, dword [ebx + edx*2]
push eax
push 2
call fcn.0049e3e0
mov word [esi], 0x7f00
test byte [esp + 0x38], 1
je 0x49942a
mov ecx, dword [esp + 0x1a8]
cmp word [ecx], 1
jne 0x499ae5
mov byte [esp + 0x13], 0xaf
jmp 0x499afb
mov dx, word [ebx + 0x5bc]
neg dx
sbb dl, dl
and dl, 0xfe
add dl, 0xae
mov byte [esp + 0x13], dl
mov ecx, dword [ebx + 0x5ea]
mov ax, word [ebp + 0xc]
push eax
mov edx, dword [ecx]
push edx
call fcn.004021e0
cdq
idiv dword [ebp + 0x264]
add esp, 8
push 0x506398
neg eax
mov dword [0x506398], eax
mov ecx, dword [ebp + 0x240]
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
mov dword [0x5063a0], edx
call dword [sym.imp.GDI32.dll_CreateFontIndirectA]
mov ecx, dword [ebp + 0x10]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SelectObject]
mov edx, dword [esp + 0x1a8]
mov dword [esp + 0x3c], eax
cmp word [edx], 0
jne 0x499b7c
mov eax, dword [ebp + 0x10]
push 1
push eax
call dword [sym.imp.GDI32.dll_SetTextAlign]
mov ecx, dword [esp + 0x18]
mov edx, dword [esi + 8]
push ecx
mov edi, eax
push edx
jmp 0x499b9e
mov eax, dword [ebp + 0x10]
push 7
push eax
call dword [sym.imp.GDI32.dll_SetTextAlign]
mov edi, eax
mov eax, dword [esp + 0x24]
cdq
mov ecx, dword [esi + 8]
sub eax, edx
mov edx, dword [esp + 0x18]
sar eax, 1
add eax, edx
push eax
push ecx
mov ecx, dword [esp + 0x1b0]
call fcn.00497b60
mov eax, dword [ebp + 0x10]
lea edx, [esp + 0x13]
push 1
push edx
push 0
push 0
push eax
call dword [sym.imp.GDI32.dll_TextOutA]
mov ecx, dword [esp + 0x3c]
mov edx, dword [ebp + 0x10]
push ecx
push edx
call dword [sym.imp.GDI32.dll_SelectObject]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [ebp + 0x10]
push edi
push eax
call dword [sym.imp.GDI32.dll_SetTextAlign]
jmp 0x49942a
mov eax, dword [esp + 0x20]
test eax, eax
jne case.0x499391.32516
mov edx, dword [ebx + 0x40c]
mov edi, dword [ebx]
lea ecx, [esp + 0x16c]
push 0
push ecx
push edx
mov ecx, ebx
call fcn.00481a50
mov eax, dword [eax + 0x10]
mov ecx, ebx
push eax
push ebp
call dword [edi + 0x1c]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x1c]
mov word [esi], ax
push ecx
mov cx, word [ebp + 0xc]
lea eax, [esp + 0xc4]
push edx
mov edx, dword [0x6559e0]
push eax
push ebx
push ecx
push ebp
call dword [edx + 0x1ee]
lea edi, [esp + 0x184]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x18
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
mov ecx, dword [esp + 0x20]
push eax
lea eax, [esp + 0x174]
mov edx, dword [ecx]
mov ecx, dword [esp + 0x20]
push eax
mov eax, dword [esp + 0x34]
push edx
mov edx, dword [esi + 8]
add eax, ecx
mov ecx, dword [esp + 0x1b8]
push eax
push edx
push 8
push 2
call fcn.0049e320
mov word [esi], 0x7f01
jmp 0x49942a
test byte [esp + 0x38], 1
je 0x49942a
cmp word [ebp + 0xe], 0
jne 0x49942a
mov eax, dword [esp + 0x74]
lea ecx, [ebx + 0xc8]
push eax
call fcn.00485250
mov edx, dword [esp + 0x68]
xor ecx, ecx
mov cx, word [esi + 4]
sub ecx, edx
mov edx, dword [esp + 0x40]
add edx, eax
lea eax, [esp + 0x80]
add ecx, edx
push eax
push ecx
call fcn.00485540
add esp, 8
test eax, eax
je 0x499e91
xor eax, eax
mov ecx, 8
lea edi, [esp + 0x100]
mov dword [esp + 0xe4], eax
mov dword [esp + 0xe8], eax
mov dword [esp + 0xec], eax
mov dword [esp + 0xf0], eax
mov dword [esp + 0xf4], eax
mov byte [esp + 0xf8], al
mov byte [esp + 0xf9], al
mov byte [esp + 0xfa], al
mov byte [esp + 0xfb], 2
mov byte [esp + 0xfc], al
mov byte [esp + 0xfd], al
mov byte [esp + 0xfe], 2
mov byte [esp + 0xff], al
rep stosd dword es:[edi], eax
mov edi, 0x4e7024
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x100]
mov eax, ecx
mov esi, edi
mov edi, edx
mov edx, dword [ebx + 0x5ea]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov byte [esp + 0x13], 0xa8
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov cx, word [ebp + 0xc]
mov eax, dword [edx]
push ecx
push eax
call fcn.004021e0
cdq
idiv dword [ebp + 0x264]
mov ecx, dword [ebp + 0x240]
add esp, 8
cdq
sub eax, edx
sar eax, 1
neg eax
mov dword [esp + 0xe4], eax
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
mov dword [esp + 0xec], edx
lea edx, [esp + 0xe4]
push edx
call dword [sym.imp.GDI32.dll_CreateFontIndirectA]
mov edi, dword [sym.imp.GDI32.dll_SelectObject]
push eax
mov eax, dword [ebp + 0x10]
push eax
call edi
mov ecx, dword [ebp + 0x10]
mov esi, dword [sym.imp.GDI32.dll_SetTextColor]
push 0xff
push ecx
mov dword [esp + 0x84], eax
call esi
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x24]
mov ecx, dword [edx + 8]
cdq
sub eax, edx
mov edx, dword [esp + 0x18]
sar eax, 1
add eax, edx
push eax
lea eax, [esp + 0xd4]
push ecx
push eax
mov ecx, dword [esp + 0x1b4]
mov ecx, dword [ecx + 0x34]
call fcn.0041b9b0
mov eax, dword [esp + 0xd0]
mov ecx, dword [esp + 0xd4]
lea edx, [esp + 0xa4]
mov dword [esp + 0xa4], eax
mov dword [esp + 0xac], eax
push 0x125
mov dword [esp + 0xac], ecx
mov dword [esp + 0xb4], ecx
mov ecx, dword [ebp + 0x10]
push edx
lea eax, [esp + 0x1b]
push 1
push eax
push ecx
call dword [sym.imp.USER32.dll_DrawTextA]
mov edx, dword [esp + 0x3c]
mov eax, dword [ebp + 0x10]
push edx
push eax
call esi
mov ecx, dword [esp + 0x7c]
mov edx, dword [ebp + 0x10]
push ecx
push edx
call edi
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov esi, dword [esp + 0x2c]
jmp 0x499ec9
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
mov eax, dword [ebp + 0x260]
push 6
lea edi, [ecx + edx]
mov edx, dword [esp + 0x1c]
add edi, edx
add ecx, edx
push edi
mov edi, dword [esi + 0xc]
shl eax, 2
add edi, eax
push edi
push ecx
mov ecx, dword [esi + 8]
sub ecx, eax
push ecx
mov ecx, dword [esp + 0x1bc]
call fcn.0049e1c0
mov edx, dword [esp + 0x74]
lea ecx, [ebx + 0xc8]
push edx
call fcn.00485270
jmp 0x49942a
mov al, byte [esi + 2]
mov ecx, dword [esp + 0x40]
and eax, 2
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x3c], eax
xor eax, eax
mov ax, word [esi + 6]
add eax, ecx
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x20]
test eax, eax
push ecx
push edx
jne 0x499fd3
mov cx, word [ebp + 0xc]
mov edx, dword [0x6559e0]
lea eax, [esp + 0x60]
push eax
push ebx
push ecx
push ebp
call dword [edx + 0x1ee]
mov eax, dword [esp + 0x8c]
add esp, 0x18
lea ecx, [ebx + 0xc8]
push eax
call fcn.00485250
test byte [esi + 0x11], 0x80
mov dword [esp + 0x20], eax
mov byte [esp + 0x13], 0
je 0x499f68
mov ecx, dword [esp + 0x68]
mov edx, eax
sub edx, ecx
mov ecx, dword [esp + 0x14]
lea eax, [edx + ecx]
inc ecx
mov dword [esp + 0x14], ecx
mov dl, byte [eax]
mov byte [eax], 0x2d
mov byte [esp + 0x13], dl
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x68]
mov ecx, dword [esp + 0x20]
sub eax, edi
sub edi, edx
mov edx, dword [esp + 0x1c]
push eax
push edi
mov eax, dword [edx]
mov edx, dword [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x34]
add ecx, edx
push eax
mov eax, dword [esi + 8]
push ecx
mov ecx, dword [esp + 0x4c]
push eax
push ecx
mov ecx, dword [esp + 0x1c4]
push 2
call fcn.0049e320
mov al, byte [esp + 0x13]
test al, al
je 0x499fbe
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x68]
sub ecx, edx
mov edx, dword [esp + 0x14]
mov byte [ecx + edx - 1], al
mov eax, dword [esp + 0x74]
lea ecx, [ebx + 0xc8]
push eax
call fcn.00485270
jmp 0x49a073
mov ecx, dword [0x6559e0]
lea eax, [esp + 0xe0]
push eax
push ebx
push 0x3e8
push ebp
call dword [ecx + 0x1ee]
add esp, 0x18
lea edx, [esp + 0x8c]
lea eax, [esp + 0x94]
push edx
mov edx, dword [esp + 0xdc]
push eax
mov eax, dword [esp + 0xe4]
sub esp, 0xc
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [esp + 0xf4]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x38]
push eax
mov dword [ecx + 8], edx
mov cx, word [esi]
mov dx, word [ebx + 0x472]
push ecx
push edx
call fcn.0048f370
mov ecx, dword [esp + 0xac]
mov eax, dword [esp + 0x48]
add esp, 0x20
lea edx, [ecx + eax]
mov ecx, dword [esp + 0x18]
add edx, ecx
push 0
push edx
mov edx, dword [esi + 0xc]
push edx
mov edx, dword [esp + 0xa0]
add edx, eax
mov eax, dword [esi + 8]
add edx, ecx
mov ecx, dword [esp + 0x1b4]
push edx
push eax
call fcn.0049e1c0
mov eax, dword [esp + 0x3c]
test ax, ax
je case.0x499391.32518
cmp ax, 2
jne 0x49942a
mov esi, dword [esi + 0xc]
jmp 0x49942d