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

Disassembly:
push 0xffffffffffffffff
push 0x5d5698
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x50
push ebx
push ebp
push esi
mov esi, dword [esp + 0x7c]
push edi
mov edi, ecx
test esi, esi
mov dword [esp + 0x28], edi
je 0x52440e
lea eax, [esp + 0x70]
push eax
call dword [sym.imp.USER32.dll_IsRectEmpty]
test eax, eax
jne 0x52440e
mov edx, dword [esp + 0x78]
mov ebx, dword [esp + 0x7c]
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x70]
mov ebp, edx
sub ebx, eax
mov eax, dword [esp + 0x90]
sub ebp, ecx
test eax, eax
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], ebx
je 0x524428
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x524428
mov eax, dword [esp + 0x8c]
test eax, eax
je 0x524428
cmp dword [eax + 4], 0
je 0x524428
mov eax, dword [edi + 4]
add ebx, esi
push 4
push ebx
mov ebx, dword [esp + 0x7c]
push esi
push ebx
mov ebx, dword [sym.imp.USER32.dll_DrawStateA]
push edx
push 0
push ecx
mov ecx, dword [eax + 4]
push 0
push 0
push ecx
call ebx
mov edx, dword [esp + 0x8c]
mov ecx, dword [esp + 0x7c]
mov edi, dword [edi + 4]
add ebp, esi
mov eax, dword [edx + 4]
mov edx, dword [esp + 0x70]
push 4
push esi
push ebp
push ecx
push edx
push 0
push eax
mov eax, dword [edi + 4]
push 0
push 0
push eax
call ebx
mov eax, 1
mov ecx, dword [esp + 0x60]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x5c
ret 0x24
lea ecx, [esp + 0x50]
call fcn.0059b3be
mov eax, dword [edi + 4]
mov dword [esp + 0x68], 0
test eax, eax
je 0x524443
mov eax, dword [eax + 4]
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push eax
lea ecx, [esp + 0x54]
call fcn.0059b475
test eax, eax
je 0x524931
mov dword [esp + 0x4c], 0
mov dword [esp + 0x48], vtable.CBitmap.0
mov eax, dword [edi + 4]
lea edi, [ebx + esi]
add ebp, esi
push edi
mov ecx, dword [eax + 4]
push ebp
push ecx
mov byte [esp + 0x74], 1
mov dword [esp + 0x30], edi
mov dword [esp + 0x1c], ebp
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
push eax
lea ecx, [esp + 0x4c]
call fcn.0059c0b2
test eax, eax
jne 0x5244ad
mov dword [esp + 0x48], vtable.CGdiObject.0
mov byte [esp + 0x68], 2
jmp 0x524928
mov ebp, dword [esp + 0x4c]
mov edx, dword [esp + 0x54]
lea eax, [esp + 0x48]
neg eax
sbb eax, eax
and eax, ebp
push eax
push edx
call fcn.0059b5b6
push 0x28
mov dword [esp + 0x44], eax
call fcn.00596900
mov ecx, dword [esp + 0x14]
mov ebp, eax
add esp, 4
xor eax, eax
mov dword [ebp + 4], ecx
imul ecx, edi
mov dword [ebp + 0x14], ecx
push eax
lea ecx, [esp + 0x84]
push eax
mov dword [ebp], 0x28
mov dword [ebp + 8], edi
mov word [ebp + 0xc], 1
mov word [ebp + 0xe], 0x20
mov dword [ebp + 0x10], eax
mov dword [ebp + 0x18], eax
mov dword [ebp + 0x1c], eax
mov dword [ebp + 0x20], eax
mov dword [ebp + 0x24], eax
mov edx, dword [esp + 0x5c]
push ecx
push eax
push ebp
push edx
mov dword [esp + 0x54], ebp
mov dword [esp + 0x98], eax
call dword [sym.imp.GDI32.dll_CreateDIBSection]
test eax, eax
mov dword [esp + 0x44], eax
je 0x524912
mov ecx, dword [esp + 0x80]
test ecx, ecx
je 0x524912
push eax
mov eax, dword [esp + 0x58]
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esp + 0x28]
mov eax, dword [ecx + 4]
test eax, eax
je 0x524561
mov eax, dword [eax + 4]
mov edx, dword [esp + 0x74]
mov ecx, dword [esp + 0x70]
push 0xcc0020
push edx
mov edx, dword [esp + 0x18]
push ecx
push eax
mov eax, dword [esp + 0x64]
push edi
push edx
push 0
push 0
push eax
call dword [sym.imp.GDI32.dll_BitBlt]
mov ecx, dword [esp + 0x88]
mov edx, dword [esp + 0x84]
mov eax, ecx
xor edi, edi
sub eax, edx
cdq
idiv esi
test esi, esi
mov edx, eax
mov dword [esp + 0x38], edx
jle 0x5247ad
lea eax, [ebx + 1]
mov dword [esp + 0x84], ecx
mov dword [esp + 0x20], eax
mov eax, edx
imul edx, esi
neg eax
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x10]
sub ecx, edx
mov dword [esp + 0x88], eax
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x14]
mov eax, ebx
sub eax, ecx
mov dword [esp + 0x2c], eax
jmp 0x5245e7
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x88]
mov ebp, ebx
add eax, ecx
cmp ebx, eax
mov dword [esp + 0x30], eax
jge 0x524645
mov eax, dword [esp + 0x7c]
mov edx, dword [esp + 0x74]
mov ebx, dword [esp + 0x70]
sub eax, ebp
sub eax, edx
mov edx, dword [esp + 0x78]
sub edx, ebx
add eax, esi
add edx, esi
mov ecx, dword [esp + 0x1c]
imul edx, eax
mov eax, dword [esp + 0x80]
add edx, edi
add edx, esi
push ecx
lea ebx, [eax + edx*4]
mov edx, dword [eax + edx*4]
push edx
call fcn.00524950
add esp, 8
mov dword [ebx], eax
mov eax, dword [esp + 0x30]
inc ebp
cmp ebp, eax
jl 0x5245fa
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
lea ebp, [esi + esi]
sub ebp, edi
add eax, edi
cmp ebp, eax
mov dword [esp + 0x30], ebp
jge 0x5246b3
jmp 0x52465e
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x7c]
mov edx, dword [esp + 0x74]
mov ecx, dword [esp + 0x78]
sub eax, edi
sub eax, edx
mov edx, dword [esp + 0x70]
sub eax, ebx
sub ecx, edx
add eax, esi
add ecx, esi
imul ecx, eax
mov edx, dword [esp + 0x80]
mov eax, dword [esp + 0x84]
add ecx, ebp
push eax
lea ebx, [edx + ecx*4]
mov ecx, dword [edx + ecx*4]
push ecx
call fcn.00524950
mov edx, dword [esp + 0x1c]
add esp, 8
mov dword [ebx], eax
inc ebp
lea eax, [edi + edx]
cmp ebp, eax
jl 0x52465a
mov ebp, dword [esp + 0x30]
mov ebx, dword [esp + 0x18]
lea eax, [ebx + edi + 1]
cmp ebp, eax
jge 0x52470d
mov eax, dword [esp + 0x7c]
mov edx, dword [esp + 0x74]
mov ecx, dword [esp + 0x78]
mov ebx, dword [esp + 0x70]
sub eax, ebp
sub ecx, ebx
sub eax, edx
add ecx, esi
add eax, esi
mov edx, dword [esp + 0x14]
imul ecx, eax
add ecx, edi
mov eax, dword [esp + 0x84]
add ecx, edx
mov edx, dword [esp + 0x80]
push eax
lea ebx, [edx + ecx*4]
mov ecx, dword [edx + ecx*4]
push ecx
call fcn.00524950
add esp, 8
mov dword [ebx], eax
mov eax, dword [esp + 0x20]
inc ebp
cmp ebp, eax
jl 0x5246bb
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x88]
cmp ebp, eax
jge 0x524766
mov eax, dword [esp + 0x7c]
mov edx, dword [esp + 0x78]
mov ebx, dword [esp + 0x70]
mov ecx, dword [esp + 0x74]
sub eax, edi
sub edx, ebx
sub eax, ecx
add edx, esi
imul edx, eax
mov eax, dword [esp + 0x80]
mov ecx, dword [esp + 0x1c]
add edx, ebp
push ecx
lea ebx, [eax + edx*4]
mov edx, dword [eax + edx*4]
push edx
call fcn.00524950
add esp, 8
mov dword [ebx], eax
mov eax, dword [esp + 0x88]
inc ebp
cmp ebp, eax
jl 0x52471c
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x84]
mov edx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x20]
add ecx, eax
inc edi
mov dword [esp + 0x84], ecx
mov ecx, dword [esp + 0x38]
add edx, ecx
mov ecx, dword [esp + 0x88]
inc ebp
dec ecx
cmp edi, esi
mov dword [esp + 0x20], ebp
mov dword [esp + 0x1c], edx
mov dword [esp + 0x88], ecx
jl 0x5245e3
mov ebp, dword [esp + 0x3c]
mov edx, dword [esp + 0x54]
mov edi, dword [esp + 0x28]
lea eax, [esp + 0x50]
push 0xcc0020
mov ecx, dword [edi + 4]
push 0
neg eax
sbb eax, eax
mov ecx, dword [ecx + 4]
and eax, edx
mov edx, dword [esp + 0x2c]
push 0
push eax
mov eax, dword [esp + 0x20]
push edx
mov edx, dword [esp + 0x88]
push eax
mov eax, dword [esp + 0x88]
push edx
push eax
push ecx
call dword [sym.imp.GDI32.dll_BitBlt]
mov ebx, dword [esp + 0x90]
test ebx, ebx
je 0x524856
mov eax, dword [edi + 4]
mov edx, dword [esp + 0x24]
push edx
lea ecx, [esi + 1]
mov edx, dword [eax + 4]
push ecx
push edx
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
push eax
mov ecx, ebx
call fcn.0059c0b2
mov eax, dword [ebx + 4]
mov ecx, dword [esp + 0x54]
push eax
push ecx
call fcn.0059b5b6
mov eax, dword [edi + 4]
test eax, eax
je 0x524831
mov eax, dword [eax + 4]
mov edx, dword [esp + 0x74]
mov ecx, dword [esp + 0x78]
push 0xcc0020
push edx
mov edx, dword [esp + 0x2c]
push ecx
push eax
mov eax, dword [esp + 0x64]
push edx
push esi
push 0
push 0
push eax
call dword [sym.imp.GDI32.dll_BitBlt]
mov ebx, dword [esp + 0x8c]
test ebx, ebx
je 0x5248bc
mov eax, dword [edi + 4]
mov edx, dword [esp + 0x10]
lea ecx, [esi + 1]
mov eax, dword [eax + 4]
push ecx
push edx
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
push eax
mov ecx, ebx
call fcn.0059c0b2
mov ecx, dword [ebx + 4]
mov edx, dword [esp + 0x54]
push ecx
push edx
call fcn.0059b5b6
mov edi, dword [edi + 4]
test edi, edi
je 0x524897
mov edi, dword [edi + 4]
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x10]
push 0xcc0020
push eax
mov eax, dword [esp + 0x5c]
push ecx
push edi
push esi
push edx
push 0
push 0
push eax
call dword [sym.imp.GDI32.dll_BitBlt]
mov eax, dword [esp + 0x40]
test eax, eax
je 0x5248c7
mov eax, dword [eax + 4]
mov ecx, dword [esp + 0x54]
push eax
push ecx
call fcn.0059b5b6
mov edx, dword [esp + 0x44]
push edx
call dword [sym.imp.GDI32.dll_DeleteObject]
push ebp
call fcn.00596929
add esp, 4
mov dword [esp + 0x48], vtable.CGdiObject.0
lea ecx, [esp + 0x48]
mov byte [esp + 0x68], 4
call fcn.0059c109
lea ecx, [esp + 0x50]
mov dword [esp + 0x68], 0xffffffff
call fcn.0059b4f3
jmp 0x52440e
push ebp
call fcn.00596929
add esp, 4
mov dword [esp + 0x48], vtable.CGdiObject.0
mov byte [esp + 0x68], 3
lea ecx, [esp + 0x48]
call fcn.0059c109
lea ecx, [esp + 0x50]
mov dword [esp + 0x68], 0xffffffff
call fcn.0059b4f3
xor eax, eax
jmp 0x524413