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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x423828
push eax
mov eax, dword [esp + 0x1c]
mov dword fs:[0], esp
sub esp, 0x58
push ebx
mov ebx, dword [esp + 0x74]
push esi
mov esi, dword [esp + 0x74]
cmp ebx, eax
push edi
je 0x40b40a
mov ecx, dword [esi + 8]
mov edi, dword [esi]
cmp ecx, edi
jl 0x40b40a
mov eax, dword [esi + 0xc]
mov edx, dword [esi + 4]
cmp eax, edx
jl 0x40b40a
sub eax, edx
sub ecx, edi
push ebp
mov ebp, eax
mov edi, ecx
lea ecx, [esp + 0x48]
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], edi
call fcn.004205a1
mov esi, dword [esp + 0x78]
xor eax, eax
cmp esi, eax
mov dword [esp + 0x70], eax
je 0x40afe5
mov eax, dword [esi + 4]
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push eax
lea ecx, [esp + 0x4c]
call fcn.00420658
mov dword [esp + 0x44], 0
mov dword [esp + 0x40], 0x424420
mov eax, dword [esi + 4]
push ebp
push edi
push eax
mov byte [esp + 0x7c], 1
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
push eax
lea ecx, [esp + 0x44]
call fcn.00420cc3
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x4c]
lea eax, [esp + 0x40]
neg eax
sbb eax, eax
and eax, edx
push eax
push ecx
call fcn.00420783
xor edx, edx
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x80]
mov dl, bh
mov ebp, edx
mov edx, dword [esp + 0x88]
mov esi, ebx
xor ecx, ecx
mov edi, dword [edx]
and esi, 0xff
shr eax, 0x10
and ebp, 0xff
and eax, 0xff
cmp edi, ecx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], ebp
mov ebx, ebp
mov dword [esp + 0x2c], eax
mov dword [esp + 0x80], eax
je 0x40b204
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x20]
mov edi, 1
inc ecx
cmp ecx, edi
mov dword [esp + 0x88], edi
mov dword [esp + 0x10], ecx
jl 0x40b37c
mov ecx, dword [esp + 0x84]
fild dword [esp + 0x10]
mov edx, ecx
and edx, 0xff
sub edx, esi
mov dword [esp + 0x84], edx
xor edx, edx
fild dword [esp + 0x84]
mov dl, ch
and edx, 0xff
fdiv st(1)
sub edx, ebp
mov dword [esp + 0x84], edx
shr ecx, 0x10
and ecx, 0xff
sub ecx, eax
fstp dword [esp + 0x30]
fild dword [esp + 0x1c]
fstp dword [esp + 0x14]
fild dword [esp + 0x84]
mov dword [esp + 0x84], ecx
fdiv st(1)
fstp dword [esp + 0x34]
fild dword [esp + 0x18]
fstp dword [esp + 0x18]
fild dword [esp + 0x84]
fdiv st(1)
fstp dword [esp + 0x38]
fstp st(0)
fild dword [esp + 0x2c]
fstp dword [esp + 0x1c]
fild dword [esp + 0x88]
fld dword [esp + 0x30]
fmul st(1)
fadd dword [esp + 0x14]
call fcn.0040df20
fld dword [esp + 0x34]
fmul st(1)
mov ebp, eax
fadd dword [esp + 0x18]
call fcn.0040df20
fld dword [esp + 0x38]
fmul st(1)
mov dword [esp + 0x84], eax
fadd dword [esp + 0x1c]
call fcn.0040df20
cmp esi, ebp
mov dword [esp + 0x88], eax
fstp st(0)
jne 0x40b18e
cmp ebx, dword [esp + 0x84]
jne 0x40b18e
cmp dword [esp + 0x80], eax
jne 0x40b18e
cmp edi, dword [esp + 0x10]
jne 0x40b1eb
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
xor edx, edx
inc eax
mov dh, byte [esp + 0x80]
and esi, 0xff
mov dl, bl
mov dword [esp + 0x60], eax
shl edx, 8
or edx, esi
lea eax, [esp + 0x58]
mov dword [esp + 0x5c], ecx
push edx
push eax
lea ecx, [esp + 0x50]
mov dword [esp + 0x60], 0
mov dword [esp + 0x6c], edi
call fcn.00421529
mov ecx, dword [esp + 0x88]
mov ebx, dword [esp + 0x84]
mov esi, ebp
mov dword [esp + 0x80], ecx
mov dword [esp + 0x28], edi
mov eax, dword [esp + 0x10]
inc edi
cmp edi, eax
mov dword [esp + 0x88], edi
jle 0x40b12c
jmp 0x40b37c
mov edx, dword [esp + 0x24]
mov dword [esp + 0x28], ecx
mov edi, 1
lea ecx, [edx + 1]
mov dword [esp + 0x88], edi
cmp ecx, edi
mov dword [esp + 0x10], ecx
jl 0x40b37c
mov ecx, dword [esp + 0x84]
fild dword [esp + 0x10]
mov edx, ecx
and edx, 0xff
sub edx, esi
mov dword [esp + 0x84], edx
xor edx, edx
fild dword [esp + 0x84]
mov dl, ch
and edx, 0xff
fdiv st(1)
sub edx, ebp
mov dword [esp + 0x84], edx
shr ecx, 0x10
and ecx, 0xff
sub ecx, eax
fstp dword [esp + 0x38]
fild dword [esp + 0x1c]
fstp dword [esp + 0x14]
fild dword [esp + 0x84]
mov dword [esp + 0x84], ecx
fdiv st(1)
fstp dword [esp + 0x34]
fild dword [esp + 0x18]
fstp dword [esp + 0x18]
fild dword [esp + 0x84]
fdiv st(1)
fstp dword [esp + 0x30]
fstp st(0)
fild dword [esp + 0x2c]
fstp dword [esp + 0x1c]
fild dword [esp + 0x88]
fld dword [esp + 0x38]
fmul st(1)
fadd dword [esp + 0x14]
call fcn.0040df20
fld dword [esp + 0x34]
fmul st(1)
mov ebp, eax
fadd dword [esp + 0x18]
call fcn.0040df20
fld dword [esp + 0x30]
fmul st(1)
mov dword [esp + 0x84], eax
fadd dword [esp + 0x1c]
call fcn.0040df20
cmp esi, ebp
mov dword [esp + 0x88], eax
fstp st(0)
jne 0x40b30b
cmp ebx, dword [esp + 0x84]
jne 0x40b30b
cmp dword [esp + 0x80], eax
jne 0x40b30b
cmp edi, dword [esp + 0x10]
jne 0x40b368
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
xor edx, edx
inc eax
mov dh, byte [esp + 0x80]
and esi, 0xff
mov dl, bl
mov dword [esp + 0x64], eax
shl edx, 8
or edx, esi
lea eax, [esp + 0x58]
mov dword [esp + 0x58], ecx
push edx
push eax
lea ecx, [esp + 0x50]
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], edi
call fcn.00421529
mov ecx, dword [esp + 0x88]
mov ebx, dword [esp + 0x84]
mov esi, ebp
mov dword [esp + 0x80], ecx
mov dword [esp + 0x28], edi
mov eax, dword [esp + 0x10]
inc edi
cmp edi, eax
mov dword [esp + 0x88], edi
jle 0x40b2a9
mov eax, dword [esp + 0x7c]
mov edi, dword [esp + 0x4c]
push 0xcc0020
push 0
mov ecx, dword [eax + 4]
mov edx, dword [eax]
lea eax, [esp + 0x50]
push 0
neg eax
sbb eax, eax
and eax, edi
push eax
mov eax, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x38]
push eax
push ecx
mov ecx, dword [esp + 0x94]
push edx
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.GDI32.dll_BitBlt]
mov eax, dword [esp + 0x3c]
pop ebp
test eax, eax
je 0x40b3c6
mov eax, dword [eax + 4]
push eax
mov eax, dword [esp + 0x4c]
push eax
call fcn.00420783
mov dword [esp + 0x3c], vtable.CGdiObject.0
lea ecx, [esp + 0x3c]
mov byte [esp + 0x6c], 2
call fcn.00420d1a
lea ecx, [esp + 0x44]
mov dword [esp + 0x6c], 0xffffffff
call fcn.004206c0
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
add esp, 0x64
ret
mov ecx, dword [esp + 0x74]
push ebx
push esi
call fcn.00421529
mov ecx, dword [esp + 0x64]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x64
ret