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

Disassembly:
sub esp, 0x58
mov eax, dword [0x4a8f7c]
xor eax, esp
mov dword [esp + 0x54], eax
cmp dword [ecx], 0
mov eax, dword [esp + 0x5c]
push esi
mov esi, dword [esp + 0x68]
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
jne 0x40ea58
xor eax, eax
pop esi
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.00451800
add esp, 0x58
ret 0x10
mov ecx, dword [esp + 0x64]
test ecx, ecx
je 0x40ea44
push ebx
push ebp
push edi
lea edx, [esp + 0x30]
push edx
call fcn.0040e720
test esi, esi
jne 0x40ea7f
mov edi, dword [esp + 0x38]
mov esi, dword [esp + 0x3c]
xor ebp, ebp
xor ebx, ebx
jmp 0x40ea8a
mov ebp, dword [esi]
mov ebx, dword [esi + 4]
mov edi, dword [esi + 8]
mov esi, dword [esi + 0xc]
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x40eaa6
mov eax, ebp
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], esi
jmp 0x40eac5
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0x44], ecx
mov ecx, dword [eax + 8]
mov dword [esp + 0x48], edx
mov edx, dword [eax + 0xc]
mov eax, dword [esp + 0x44]
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], edx
cmp dword [esp + 0x4c], 0
jl 0x40ee22
mov ecx, dword [esp + 0x10]
cmp eax, dword [ecx + 0x10]
jg 0x40ee22
cmp dword [esp + 0x50], 0
jl 0x40ee22
mov edx, dword [ecx + 0x14]
cmp dword [esp + 0x48], edx
jg 0x40ee22
test eax, eax
jge 0x40eb03
sub ebp, eax
mov dword [esp + 0x44], 0
mov eax, dword [ecx + 0x10]
cmp dword [esp + 0x4c], eax
jle 0x40eb18
mov edx, eax
sub edx, dword [esp + 0x4c]
mov dword [esp + 0x4c], eax
add edi, edx
mov eax, dword [esp + 0x48]
test eax, eax
jge 0x40eb2a
sub ebx, eax
mov dword [esp + 0x48], 0
mov eax, dword [ecx + 0x14]
mov edx, dword [esp + 0x50]
cmp edx, eax
jle 0x40eb3f
mov ecx, eax
sub ecx, edx
add esi, ecx
mov dword [esp + 0x50], eax
call dword [sym.imp.GDI32.dll_GdiFlush]
cmp dword [esp + 0x40], 0
je 0x40ecbf
mov edx, dword [esp + 0x10]
sub edi, ebp
mov dword [esp + 0x20], edi
mov edi, dword [esp + 0x38]
sub esi, ebx
lea eax, [edi*4]
imul edi, ebx
add edi, dword [esp + 0x40]
imul eax, ebx
add eax, dword [esp + 0x34]
mov dword [esp + 0x14], esi
mov esi, dword [edx + 0x10]
add esi, esi
add esi, esi
mov ecx, esi
imul ecx, dword [esp + 0x48]
lea eax, [eax + ebp*4]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x44]
lea ecx, [ecx + eax*4]
add ecx, dword [edx]
mov dl, byte [esp + 0x78]
shr dl, 3
add edi, ebp
mov al, 0x1f
sub al, dl
mov dword [esp + 0x2c], esi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x24], edi
xor edx, edx
movzx ebp, al
cmp edx, ebp
jg 0x40ebc0
mov byte [esp + edx + 0x44], 0
jmp 0x40ebc8
mov bl, dl
sub bl, al
mov byte [esp + edx + 0x44], bl
inc edx
cmp edx, 0x20
jb 0x40ebb5
mov eax, dword [esp + 0x14]
test eax, eax
jbe 0x40ee22
mov dword [esp + 0x14], eax
mov edi, edi
xor edx, edx
mov dword [esp + 0x1c], edx
cmp dword [esp + 0x20], edx
jbe 0x40ec94
mov ebx, dword [esp + 0x18]
sub ebx, ecx
lea eax, [ecx + 2]
mov dword [esp + 0x28], ebx
lea ecx, [ecx]
movzx ecx, byte [edx + edi]
shr ecx, 3
movzx ecx, byte [esp + ecx + 0x44]
mov esi, 0x1f
sub esi, ecx
test ecx, ecx
je 0x40ec7a
cmp ecx, 0x1f
jne 0x40ec28
mov ecx, dword [esp + 0x18]
mov ecx, dword [ecx + edx*4]
mov dword [eax - 2], ecx
jmp 0x40ec7a
movzx edi, byte [eax + ebx - 1]
movzx ebx, byte [eax + ebx]
imul edi, ecx
mov ebp, dword [esp + 0x18]
imul ebx, ecx
movzx ebp, byte [ebp + edx*4]
movzx edx, byte [eax]
imul ebp, ecx
imul edx, esi
add edx, ebx
sar edx, 5
mov byte [eax], dl
movzx edx, byte [eax - 1]
imul edx, esi
mov ebx, dword [esp + 0x28]
add edx, edi
mov edi, dword [esp + 0x24]
sar edx, 5
mov byte [eax - 1], dl
movzx edx, byte [eax - 2]
imul edx, esi
add edx, ebp
sar edx, 5
mov byte [eax - 2], dl
mov edx, dword [esp + 0x1c]
inc edx
add eax, 4
mov dword [esp + 0x1c], edx
cmp edx, dword [esp + 0x20]
jb 0x40ec00
mov esi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x38]
lea eax, [edx*4]
add dword [esp + 0x18], eax
add ecx, esi
add edi, edx
sub dword [esp + 0x14], 1
mov dword [esp + 0x10], ecx
mov dword [esp + 0x24], edi
jne 0x40ebe0
jmp 0x40ee22
mov al, byte [esp + 0x78]
shr al, 3
test al, al
je 0x40ee22
cmp al, 0x1f
jne 0x40ed26
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x44]
push 0xcc0020
push ebx
push ebp
push eax
mov eax, dword [esp + 0x60]
sub eax, dword [ecx + 4]
push eax
mov eax, dword [esp + 0x60]
sub eax, dword [ecx]
mov ecx, dword [esp + 0x5c]
push eax
mov eax, dword [esp + 0x28]
push ecx
mov ecx, dword [eax + 4]
push edx
push ecx
call dword [sym.imp.GDI32.dll_BitBlt]
test eax, eax
jne 0x40ee22
pop edi
pop ebp
pop ebx
pop esi
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.00451800
add esp, 0x58
ret 0x10
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 0x10]
sub esi, ebx
mov edx, esi
mov esi, dword [esp + 0x38]
add esi, esi
add esi, esi
mov dword [esp + 0x24], esi
imul esi, ebx
add esi, dword [esp + 0x34]
add eax, eax
lea ebx, [esi + ebp*4]
add eax, eax
mov esi, eax
imul esi, dword [esp + 0x48]
sub edi, ebp
mov ebp, dword [esp + 0x44]
lea esi, [esi + ebp*4]
add esi, dword [ecx]
movzx ecx, byte [esp + 0x78]
shr ecx, 3
mov ebp, 0x20
sub ebp, ecx
mov dword [esp + 0x20], edi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x18], ebx
mov dword [esp + 0x10], esi
test edx, edx
jbe 0x40ee22
mov dword [esp + 0x14], edx
xor edx, edx
mov dword [esp + 0x1c], edx
test edi, edi
jbe 0x40ee09
sub ebx, esi
lea eax, [esi + 2]
mov dword [esp + 0x28], ebx
jmp 0x40eda4
mov ebx, dword [esp + 0x28]
movzx esi, byte [eax + ebx - 1]
movzx ebx, byte [eax + ebx]
imul esi, ecx
mov edi, dword [esp + 0x18]
imul ebx, ecx
movzx edi, byte [edi + edx*4]
movzx edx, byte [eax]
imul edi, ecx
imul edx, ebp
add edx, ebx
sar edx, 5
mov byte [eax], dl
movzx edx, byte [eax - 1]
imul edx, ebp
add edx, esi
sar edx, 5
mov byte [eax - 1], dl
movzx edx, byte [eax - 2]
imul edx, ebp
add edx, edi
mov edi, dword [esp + 0x20]
sar edx, 5
mov byte [eax - 2], dl
mov edx, dword [esp + 0x1c]
inc edx
add eax, 4
mov dword [esp + 0x1c], edx
cmp edx, edi
jb 0x40eda0
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x2c]
mov ebx, dword [esp + 0x18]
add ebx, dword [esp + 0x24]
add esi, eax
sub dword [esp + 0x14], 1
mov dword [esp + 0x18], ebx
mov dword [esp + 0x10], esi
jne 0x40ed88
mov ecx, dword [esp + 0x64]
pop edi
pop ebp
pop ebx
pop esi
xor ecx, esp
mov eax, 1
call fcn.00451800
add esp, 0x58
ret 0x10