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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x59dcd8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x5c
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, ecx
mov ecx, dword [ebp + 0xc]
push edi
sub ebx, ecx
mov dword [esp + 0x24], esi
test ebx, ebx
mov dword [esp + 0x28], ebx
jle 0x504290
mov edi, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
sub edi, ecx
test edi, edi
mov dword [esp + 0x10], edi
jle 0x504290
cmp dword [0x603868], 8
jg 0x5042a9
mov ecx, dword [esi + 4]
lea eax, [ebp + 8]
push eax
push ecx
call fcn.004cb4f0
add esp, 8
mov eax, 1
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
lea ecx, [esp + 0x58]
call fcn.0055ad94
mov eax, dword [esi + 4]
mov dword [esp + 0x70], 0
test eax, eax
je 0x5042c4
mov eax, dword [eax + 4]
push eax
call dword [0x5e9528]
push eax
lea ecx, [esp + 0x5c]
call fcn.0055ae4b
test eax, eax
jne 0x504300
lea ecx, [esp + 0x58]
mov dword [esp + 0x70], 0xffffffff
call fcn.0055aec9
xor eax, eax
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
mov dword [esp + 0x38], 0
mov dword [esp + 0x34], vtable.CBitmap.0
mov eax, dword [esi + 4]
push ebx
push edi
mov byte [esp + 0x78], 1
mov edx, dword [eax + 4]
push edx
call dword [0x5e954c]
push eax
lea ecx, [esp + 0x38]
call fcn.0055ba92
test eax, eax
jne 0x50436f
mov dword [esp + 0x34], vtable.CGdiObject.0
lea ecx, [esp + 0x34]
mov byte [esp + 0x70], 2
call fcn.0055bae9
lea ecx, [esp + 0x58]
mov dword [esp + 0x70], 0xffffffff
call fcn.0055aec9
xor eax, eax
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
mov esi, dword [esp + 0x38]
lea eax, [esp + 0x34]
neg eax
sbb eax, eax
and eax, esi
push eax
mov eax, dword [esp + 0x60]
push eax
call fcn.0055afc4
push 0x28
mov dword [esp + 0x30], eax
call fcn.00557770
mov esi, eax
add esp, 4
xor eax, eax
lea ecx, [esp + 0xc]
mov dword [esi + 4], edi
mov edi, ebx
imul edi, dword [esp + 0x10]
push eax
push eax
mov dword [esi], 0x28
mov dword [esi + 8], ebx
mov word [esi + 0xc], 1
mov word [esi + 0xe], 0x20
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], edi
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], eax
mov edx, dword [esp + 0x64]
push ecx
push eax
push esi
push edx
mov dword [esp + 0x24], eax
call dword [0x5e95a0]
test eax, eax
mov dword [esp + 0x30], eax
je 0x50463b
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x50463b
push eax
mov eax, dword [esp + 0x60]
push eax
call dword [0x5e9518]
mov ecx, dword [esp + 0x24]
mov eax, dword [ecx + 4]
test eax, eax
je 0x504419
mov eax, dword [eax + 4]
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push 0xcc0020
push edx
mov edx, dword [esp + 0x18]
push ecx
push eax
mov eax, dword [esp + 0x6c]
push ebx
push edx
push 0
push 0
push eax
call dword [0x5e9548]
mov eax, dword [ebp + 0x1c]
cmp eax, 0xffffffff
je 0x50445a
xor ecx, ecx
mov cl, ah
mov ch, al
shr eax, 0x10
shl ecx, 8
and eax, 0xff
or ecx, eax
mov dword [ebp + 0x1c], ecx
cmp dword [ebp + 0x20], 0xffffffff
jne 0x504469
mov edx, dword [0x603728]
mov dword [ebp + 0x20], edx
test edi, edi
jle 0x5045ae
mov dword [esp + 0x20], edi
mov eax, dword [esp + 0xc]
mov ecx, dword [ebp + 0x1c]
mov eax, dword [eax]
cmp eax, ecx
je 0x504594
lea ecx, [esp + 0x3c]
lea edx, [esp + 0x4c]
push ecx
lea ecx, [esp + 0x48]
push edx
push ecx
push eax
call fcn.00505d40
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x58]
push 0
push 0
push edx
mov edx, dword [esp + 0x60]
push eax
push ecx
push edx
call fcn.00505b50
mov ecx, eax
mov eax, dword [ebp + 0x18]
add esp, 0x28
cmp eax, 0xffffffff
jne 0x50456a
mov eax, dword [ebp + 0x20]
mov edi, ecx
shr eax, 0x10
and edi, 0xff
and eax, 0xff
sub eax, edi
mov ebx, 0xff
cdq
sub eax, edx
sar eax, 1
add eax, edi
cmp eax, 0xff
jg 0x5044f3
mov ebx, eax
xor eax, eax
mov dword [esp + 0x14], 0xff
mov al, ch
mov edi, eax
xor eax, eax
mov al, byte [ebp + 0x21]
and edi, 0xff
and eax, 0xff
sub eax, edi
cdq
sub eax, edx
sar eax, 1
add eax, edi
cmp eax, 0xff
jg 0x504525
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x20]
shr ecx, 0x10
and ecx, 0xff
and eax, 0xff
sub eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, ecx
cmp eax, 0xff
jle 0x50454b
mov eax, 0xff
mov edx, dword [esp + 0xc]
xor ecx, ecx
mov ch, al
and ebx, 0xff
mov cl, byte [esp + 0x14]
shl ecx, 8
or ecx, ebx
mov ebx, dword [esp + 0x28]
mov dword [edx], ecx
jmp 0x504594
fild dword [ebp + 0x18]
fmul qword [0x5b28d0]
fstp qword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
push eax
push edx
push eax
push edx
push eax
push edx
push ecx
call fcn.005056c0
mov ecx, dword [esp + 0x28]
add esp, 0x1c
mov dword [ecx], eax
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x20]
add ecx, 4
dec eax
mov dword [esp + 0xc], ecx
mov dword [esp + 0x20], eax
jne 0x504475
mov edx, dword [esp + 0x24]
lea eax, [esp + 0x58]
neg eax
mov ecx, dword [edx + 4]
mov edx, dword [esp + 0x5c]
sbb eax, eax
push 0xcc0020
mov ecx, dword [ecx + 4]
and eax, edx
mov edx, dword [ebp + 0xc]
push 0
push 0
push eax
mov eax, dword [esp + 0x20]
push ebx
push eax
mov eax, dword [ebp + 8]
push edx
push eax
push ecx
call dword [0x5e9548]
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x5045f0
mov eax, dword [eax + 4]
mov edx, dword [esp + 0x5c]
push eax
push edx
call fcn.0055afc4
mov eax, dword [esp + 0x30]
push eax
call dword [0x5e9540]
push esi
call fcn.00557799
add esp, 4
mov dword [esp + 0x34], vtable.CGdiObject.0
lea ecx, [esp + 0x34]
mov byte [esp + 0x70], 4
call fcn.0055bae9
lea ecx, [esp + 0x58]
mov dword [esp + 0x70], 0xffffffff
call fcn.0055aec9
jmp 0x504290
push esi
call fcn.00557799
add esp, 4
mov dword [esp + 0x34], vtable.CGdiObject.0
lea ecx, [esp + 0x34]
mov byte [esp + 0x70], 3
call fcn.0055bae9
lea ecx, [esp + 0x58]
mov dword [esp + 0x70], 0xffffffff
call fcn.0055aec9
mov ecx, dword [esp + 0x68]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x1c