Function at 0x414b20
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 0x41505c
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.0040da90
mov ecx, esi
call fcn.0040dbe0
cmp dword [ebp + 0xb4], edi
je 0x414d35
push esi
lea ecx, [esp + 0x140]
call fcn.0040c5b0
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.0040ca80
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.0040dc90
jmp 0x414d3f
mov dword [ebp + 0x15c], 1
cmp dword [ebp + 0xc8], edi
jne 0x414d4f
cmp dword [ebp + 0xcc], edi
je 0x414d5f
mov eax, dword [ebp + 0x174]
cmp dword [eax + 0x28], edi
jne 0x414d82
cmp dword [eax + 0x2c], edi
jne 0x414d82
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.0041a3e0
jmp 0x414e68
mov ebx, dword [eax + 0x2c]
mov dword [esp + 0x24], edi
cmp ebx, edi
mov dword [esp + 0x14], edi
jne 0x414ddc
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 0x414dc5
mov eax, dword [eax + 0x140c]
cmp eax, edi
je 0x414dc5
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 0x414de3
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.0041a4d0
mov ecx, dword [ebp + 0x174]
cmp ebx, dword [ecx + 0x2c]
je 0x414e5f
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 0x414e68
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 0x414ffd
cmp dword [ebp + 0x29c], 0x80000000
je 0x414ffd
lea eax, [ebp + 0x158]
lea ecx, [esp + 0x90]
push eax
call fcn.0040c5b0
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.0040ca80
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.00406a10
mov eax, dword [ebp + 0xc0]
add esp, 4
test eax, eax
mov esi, 3
je 0x414f18
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.0041ad30
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.0041ad30
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.0041ad30
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.0041ad30
mov ecx, dword [esp + 0x28]
add esp, 0x18
lea eax, [esp + 0x90]
push 0
push eax
push ecx
lea ecx, [ebp + 0x158]
call fcn.0040dc90
lea ecx, [ebp + 0x158]
call fcn.0040f1f0
cmp dword [ebp + 0x29c], 0x80000000
je 0x415046
mov eax, dword [esp + 0x10]
test eax, eax
je 0x415032
lea edi, [ebp + 0x4c4]
mov esi, dword [eax]
push eax
mov ecx, edi
call fcn.00406ce0
test esi, esi
mov eax, esi
jne 0x415022
lea ecx, [esp + 0x90]
mov dword [esp + 0x10], 0
call fcn.0040c5e0
mov eax, dword [ebp + 0xb4]
test eax, eax
je 0x41505c
lea ecx, [esp + 0x13c]
call fcn.0040c5e0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1d8
ret 4