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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x452948
push eax
mov dword fs:[0], esp
sub esp, 0x38
push ebx
mov ebx, ecx
push ebp
push esi
mov eax, dword [ebx + 4]
push edi
test eax, eax
je 0x402e1d
call fcn.00402bd0
mov ecx, ebx
mov edi, eax
call fcn.00402c00
mov ebp, dword [esp + 0x6c]
test ebp, ebp
jne 0x402da1
mov ebp, edi
mov ecx, dword [esp + 0x70]
test ecx, ecx
jne 0x402dab
mov ecx, eax
mov esi, dword [esp + 0x64]
test esi, esi
jl 0x402e1d
cmp esi, ebp
jge 0x402e1d
cmp ebp, edi
jg 0x402e1d
mov edx, dword [esp + 0x68]
xor edi, edi
cmp edx, edi
jl 0x402e1d
cmp edx, ecx
jge 0x402e1d
cmp ecx, eax
jg 0x402e1d
sub ecx, edx
sub ebp, esi
mov esi, ecx
lea ecx, [esp + 0x38]
mov dword [esp + 0x18], ebp
mov dword [esp + 0x6c], esi
call fcn.004325f8
mov eax, dword [esp + 0x58]
mov dword [esp + 0x50], edi
cmp eax, edi
jne 0x402df4
xor eax, eax
jmp 0x402df7
mov eax, dword [eax + 4]
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push eax
lea ecx, [esp + 0x3c]
call sub.MFC42.DLL_CDC::Attach
cmp eax, edi
jne 0x402e34
lea ecx, [esp + 0x38]
mov dword [esp + 0x50], 0xffffffff
call sub.MFC42.DLL_CDC::CDC
xor eax, eax
mov ecx, dword [esp + 0x48]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x44
ret 0x24
mov eax, dword [ebx + 4]
cmp eax, edi
je 0x402e4d
push eax
mov eax, dword [esp + 0x40]
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x20], eax
jmp 0x402e51
mov dword [esp + 0x20], edi
mov ecx, dword [esp + 0x74]
mov ebx, dword [esp + 0x78]
lea eax, [ecx + ebp - 1]
cdq
idiv ebp
mov ecx, eax
lea eax, [esi + ebx - 1]
cdq
idiv esi
test ecx, ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x24], eax
jle 0x402f88
mov esi, dword [esp + 0x5c]
mov edx, ebp
mov ecx, esi
mov edi, esi
neg edx
neg ecx
mov dword [esp + 0x70], ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x60]
mov dword [esp + 0x34], edx
jmp 0x402ea1
mov eax, dword [esp + 0x24]
test eax, eax
jle 0x402f6d
lea edx, [edi + ebp]
mov dword [esp + 0x14], eax
mov dword [esp + 0x30], edx
lea edx, [ecx + ebx]
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x74]
add esi, edx
mov dword [esp + 0x2c], esi
mov esi, dword [esp + 0x6c]
neg esi
jmp 0x402ed1
mov ebp, dword [esp + 0x18]
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0x28]
add eax, ecx
cmp eax, edx
mov dword [esp + 0x30], eax
jle 0x402ee9
mov dword [esp + 0x10], ebx
jmp 0x402ef1
mov edx, dword [esp + 0x6c]
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x2c]
lea eax, [edi + ebp]
cmp eax, edx
jle 0x402f0e
mov eax, dword [esp + 0x70]
mov edx, dword [esp + 0x5c]
add edx, eax
mov eax, dword [esp + 0x74]
add edx, eax
jmp 0x402f10
mov edx, ebp
mov ebp, dword [esp + 0x3c]
lea eax, [esp + 0x38]
neg eax
sbb eax, eax
push 0xcc0020
and eax, ebp
mov ebp, dword [esp + 0x6c]
push ebp
mov ebp, dword [esp + 0x6c]
push ebp
push eax
mov eax, dword [esp + 0x20]
push eax
push edx
push ecx
mov ecx, dword [esp + 0x74]
push edi
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.GDI32.dll_BitBlt]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x30]
add ebx, esi
dec eax
mov dword [esp + 0x14], eax
jne 0x402ecd
mov ebx, dword [esp + 0x78]
mov ecx, dword [esp + 0x60]
mov esi, dword [esp + 0x5c]
mov ebp, dword [esp + 0x18]
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x70]
add edi, ebp
add eax, edx
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x1c]
dec eax
mov dword [esp + 0x1c], eax
jne 0x402e9d
mov eax, dword [esp + 0x20]
test eax, eax
je 0x402f9c
push eax
mov eax, dword [esp + 0x40]
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
lea ecx, [esp + 0x38]
mov dword [esp + 0x50], 0xffffffff
call sub.MFC42.DLL_CDC::CDC
mov eax, 1
jmp 0x402e1f