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

Disassembly:
sub esp, 0x1d8
push ebx
push ebp
mov ebp, ecx
push esi
push edi
xor edi, edi
mov eax, dword [ebp + 0xbc]
cmp dword [eax + 0xc], edi
je 0x41503c
mov ecx, dword [ebp + 0xc0]
mov edx, dword [esp + 0x1ec]
lea esi, [ebp + 0x158]
push ecx
push edx
push eax
mov ecx, esi
call fcn.0040da70
mov ecx, esi
call fcn.0040dbc0
cmp dword [ebp + 0xb4], edi
je 0x414d15
push esi
lea ecx, [esp + 0x140]
call fcn.0040c590
movzx cx, byte [ebp + 0xb5]
movzx ax, byte [ebp + 0xb4]
movzx dx, byte [ebp + 0xb6]
mov word [esp + 0x15e], cx
lea ecx, [esp + 0x13c]
mov dword [esp + 0x148], edi
mov word [esp + 0x162], 0xff
mov word [esp + 0x160], ax
mov word [esp + 0x15c], dx
call fcn.0040ca60
mov ecx, dword [ebp + 0x184]
mov edx, dword [ebp + 0x188]
lea eax, [esp + 0x70]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x50], eax
mov eax, dword [ebp + 0x17c]
mov dword [esp + 0x14], eax
mov dword [esp + 0x24], eax
lea eax, [esp + 0x34]
mov dword [esp + 0x18], edx
lea ecx, [esp + 0x14]
push eax
lea edx, [esp + 0x28]
push ecx
push edx
mov dword [esp + 0x7c], edi
call fcn.00401e50
mov ax, word [esp + 0x40]
mov cx, word [esp + 0x44]
mov dx, word [esp + 0x48]
mov word [esp + 0x6c], ax
mov ax, word [esp + 0x4c]
mov word [esp + 0x6e], cx
mov cx, word [esp + 0x50]
mov word [esp + 0x72], ax
mov word [esp + 0x70], dx
mov dx, word [esp + 0x54]
lea eax, [esp + 0x40]
mov word [esp + 0x74], cx
push eax
mov word [esp + 0x7a], dx
call fcn.00401f10
cmp eax, 1
mov eax, dword [ebp + 0x180]
setle cl
mov dword [esp + 0x24], eax
mov dword [esp + 0x34], eax
lea edx, [esp + 0x44]
mov byte [esp + 0x7c], cl
lea eax, [esp + 0x24]
push edx
lea ecx, [esp + 0x38]
push eax
push ecx
call fcn.00401e50
mov dx, word [esp + 0x50]
mov ax, word [esp + 0x54]
mov cx, word [esp + 0x58]
mov word [esp + 0x9c], dx
mov dx, word [esp + 0x5c]
mov word [esp + 0x9e], ax
mov ax, word [esp + 0x60]
mov word [esp + 0xa2], dx
mov word [esp + 0xa0], cx
mov cx, word [esp + 0x64]
lea edx, [esp + 0x50]
mov word [esp + 0xa4], ax
push edx
mov word [esp + 0xaa], cx
call fcn.00401f10
add esp, 0x20
cmp eax, 1
setle al
mov byte [esp + 0x8c], al
mov byte [esp + 0x8e], 0
mov byte [esp + 0x6e], 0
mov byte [esp + 0x8d], 1
mov byte [esp + 0x6d], 1
lea ecx, [esp + 0x13c]
lea eax, [esp + 0x13c]
mov dword [esp + 0x78], ecx
push edi
lea ecx, [esp + 0x54]
push eax
lea edx, [esp + 0x144]
push ecx
mov ecx, esi
mov dword [esp + 0x64], edx
mov dword [esp + 0x88], edi
mov dword [esp + 0x68], edi
call fcn.0040dc70
jmp 0x414d1f
mov dword [ebp + 0x15c], 1
cmp dword [ebp + 0xc8], edi
jne 0x414d2f
cmp dword [ebp + 0xcc], edi
je 0x414d3f
mov eax, dword [ebp + 0x174]
cmp dword [eax + 0x28], edi
jne 0x414d62
cmp dword [eax + 0x2c], edi
jne 0x414d62
push edi
mov ecx, 0xb
sub esp, 0x2c
mov esi, ebp
mov edi, esp
lea eax, [ebp + 0x158]
rep movsd dword es:[edi], dword [esi]
push eax
lea ecx, [ebp + 0x2c]
call fcn.0041a2f0
jmp 0x414e48
mov ebx, dword [eax + 0x2c]
mov dword [esp + 0x24], edi
cmp ebx, edi
mov dword [esp + 0x14], edi
jne 0x414dbc
push edi
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov edx, dword [ebp + 0x174]
mov ebx, eax
mov eax, dword [edx + 0x20]
cmp eax, edi
je 0x414da5
mov eax, dword [eax + 0x140c]
cmp eax, edi
je 0x414da5
push edi
push eax
push ebx
call dword [sym.imp.GDI32.dll_SelectPalette]
push ebx
mov dword [esp + 0x28], eax
call dword [sym.imp.GDI32.dll_RealizePalette]
mov eax, dword [ebp + 0x174]
mov ecx, dword [eax + 0x28]
push ecx
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x14], eax
jmp 0x414dc3
push ebx
call dword [sym.imp.GDI32.dll_SaveDC]
mov eax, dword [esp + 0x1ec]
mov edx, dword [eax + 0xc]
mov ecx, dword [eax + 4]
push edx
mov edx, dword [eax + 8]
mov eax, dword [eax]
push ecx
push edx
push eax
push ebx
call dword [sym.imp.GDI32.dll_IntersectClipRect]
push 0x18
push ebx
call dword [sym.imp.GDI32.dll_SetTextAlign]
push 1
push ebx
call dword [sym.imp.GDI32.dll_SetBkMode]
push edi
push ebx
sub esp, 0x2c
mov ecx, 0xb
mov esi, ebp
mov edi, esp
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp + 0x158]
lea ecx, [ebp + 0x2c]
push eax
call fcn.0041a3e0
mov ecx, dword [ebp + 0x174]
cmp ebx, dword [ecx + 0x2c]
je 0x414e3f
mov edx, dword [esp + 0x24]
push 0
push edx
push ebx
call dword [sym.imp.GDI32.dll_SelectPalette]
mov eax, dword [esp + 0x14]
push eax
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
push ebx
call dword [sym.imp.GDI32.dll_DeleteDC]
jmp 0x414e48
push 0xffffffffffffffff
push ebx
call dword [sym.imp.GDI32.dll_RestoreDC]
mov eax, dword [ebp + 0x2ac]
xor esi, esi
cmp eax, esi
mov dword [esp + 0x10], esi
je 0x414fdd
cmp dword [ebp + 0x29c], 0x80000000
je 0x414fdd
lea eax, [ebp + 0x158]
lea ecx, [esp + 0x90]
push eax
call fcn.0040c590
mov eax, 0xff
lea ecx, [esp + 0x90]
mov dword [esp + 0x9c], esi
mov word [esp + 0xb6], ax
mov word [esp + 0xb4], ax
mov word [esp + 0xb2], ax
mov word [esp + 0xb0], si
call fcn.0040ca60
mov ecx, dword [ebp + 0x2a4]
mov edx, dword [ebp + 0x2a8]
mov ebx, dword [ebp + 0x29c]
mov edi, dword [ebp + 0x2a0]
lea eax, [esp + 0x34]
mov dword [esp + 0x2c], ecx
push eax
mov dword [esp + 0x34], edx
call fcn.004069f0
mov eax, dword [ebp + 0xc0]
add esp, 4
test eax, eax
mov esi, 3
je 0x414ef8
mov esi, 0xc
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
mov dword [esp + 0x1c], ecx
lea eax, [ebx + esi]
lea ecx, [esp + 0x10]
mov dword [esp + 0x18], edi
mov dword [esp + 0x20], edx
push 0
mov dword [esp + 0x1c], eax
push ecx
lea edx, [esp + 0x98]
push ebp
lea eax, [esp + 0x40]
push edx
lea ecx, [esp + 0x24]
push eax
push ecx
mov dword [esp + 0x2c], ebx
call fcn.0041ac40
mov edx, edi
lea eax, [esp + 0x28]
sub edx, esi
push 0
mov dword [esp + 0x30], edx
push eax
lea ecx, [esp + 0xb0]
push ebp
lea edx, [esp + 0x58]
push ecx
lea eax, [esp + 0x3c]
push edx
push eax
mov dword [esp + 0x48], edi
call fcn.0041ac40
mov ecx, dword [esp + 0x5c]
lea edx, [esp + 0x40]
add ecx, esi
push 0
mov dword [esp + 0x54], ecx
push edx
lea eax, [esp + 0xc8]
push ebp
lea ecx, [esp + 0x70]
push eax
lea edx, [esp + 0x54]
push ecx
push edx
mov dword [esp + 0x5c], ebx
call fcn.0041ac40
mov eax, dword [esp + 0x78]
add esp, 0x48
mov ecx, eax
lea edx, [esp + 0x10]
sub ecx, esi
mov dword [esp + 0x20], eax
push 0
mov dword [esp + 0x20], ecx
push edx
lea eax, [esp + 0x98]
push ebp
lea ecx, [esp + 0x40]
push eax
lea edx, [esp + 0x24]
push ecx
push edx
call fcn.0041ac40
mov ecx, dword [esp + 0x28]
add esp, 0x18
lea eax, [esp + 0x90]
push 0
push eax
push ecx
lea ecx, [ebp + 0x158]
call fcn.0040dc70
lea ecx, [ebp + 0x158]
call fcn.0040f1d0
cmp dword [ebp + 0x29c], 0x80000000
je 0x415026
mov eax, dword [esp + 0x10]
test eax, eax
je 0x415012
lea edi, [ebp + 0x4c4]
mov esi, dword [eax]
push eax
mov ecx, edi
call fcn.00406cc0
test esi, esi
mov eax, esi
jne 0x415002
lea ecx, [esp + 0x90]
mov dword [esp + 0x10], 0
call fcn.0040c5c0
mov eax, dword [ebp + 0xb4]
test eax, eax
je 0x41503c
lea ecx, [esp + 0x13c]
call fcn.0040c5c0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1d8
ret 4