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

Disassembly:
sub esp, 0x98
push ebx
push ebp
mov ebp, dword [esp + 0xc4]
xor eax, eax
push esi
mov esi, dword [esp + 0xac]
xor bl, bl
cmp ebp, eax
push edi
mov edi, dword [esp + 0xc4]
setne byte [esp + 0x17]
mov byte [esp + 0x1f], bl
mov dword [esp + 0x4c], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x54], eax
cmp edi, 1
jge 0x4878cb
mov edi, 1
mov dword [esp + 0xc4], edi
push 0
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov dword [esp + 0x70], eax
test eax, eax
je 0x4880e9
push 8
lea eax, [esp + 0x1a]
push eax
mov eax, dword [esp + 0xc8]
lea ecx, [esp + 0x48]
push ecx
lea edx, [esp + 0x5c]
push edx
push eax
mov eax, dword [esp + 0x84]
call fcn.00438da0
add esp, 0x14
mov dword [esp + 0x6c], eax
test eax, eax
je 0x4880c2
mov ecx, dword [esp + 0x40]
mov eax, ecx
cdq
idiv edi
mov ebx, dword [esp + 0x50]
mov dword [esp + 0x64], eax
imul eax, ebx
imul ebx, ecx
mov dword [esp + 0x88], eax
imul eax, edi
cmp eax, ebx
je 0x48793f
mov bl, 1
jmp 0x4880b5
xor edi, edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x44], edi
cmp ebp, edi
je 0x48799b
push 8
lea ecx, [esp + 0x1a]
push ecx
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x48]
push eax
mov eax, dword [esp + 0x80]
push ebp
call fcn.00438da0
add esp, 0x14
mov dword [esp + 0x54], eax
test eax, eax
jne 0x48797d
mov bl, 1
jmp 0x4880b5
mov ecx, dword [esp + 0x50]
cmp ecx, dword [esp + 0x3c]
jne 0x487991
mov edi, dword [esp + 0x44]
cmp dword [esp + 0x64], edi
je 0x48799b
mov byte [esp + 0x1f], 1
jmp 0x4880a0
mov eax, dword [esp + 0xac]
push 0xffffffffffffffff
push 0
lea edx, [esp + 0x34]
push edx
push 0
push 0
push 0
push 0
push 0
push 0
push eax
lea ecx, [esp + 0x74]
push ecx
call fcn.0049b5e0
add esp, 0x2c
test al, al
je 0x4880a0
mov eax, dword [esp + 0x4c]
lea edx, [esp + 0x90]
push edx
push 0x18
push eax
call dword [sym.imp.GDI32.dll_GetObjectW]
test eax, eax
je 0x4880a0
cmp dword [esp + 0xb8], 0
mov edx, dword [esp + 0x94]
mov dword [esp + 0x34], edx
jg 0x487a06
mov dword [esp + 0xb8], edx
cmp dword [esp + 0xbc], 0
mov ecx, dword [esp + 0x98]
jg 0x487a1e
mov dword [esp + 0xbc], ecx
test esi, esi
jns 0x487a2b
add dword [esp + 0xb8], esi
xor esi, esi
mov ebp, dword [esp + 0xb4]
test ebp, ebp
jns 0x487a3f
add dword [esp + 0xbc], ebp
xor ebp, ebp
mov eax, dword [esp + 0xb8]
cmp eax, 1
jl 0x4880a0
cmp dword [esp + 0xbc], 1
jl 0x4880a0
add eax, esi
cmp eax, edx
jg 0x4880a0
mov eax, dword [esp + 0xbc]
add eax, ebp
cmp eax, ecx
jg 0x4880a0
imul edi, dword [esp + 0x3c]
mov eax, ecx
imul eax, edx
sub ecx, ebp
dec ecx
mov dword [esp + 0x80], esi
sub esi, dword [esp + 0x50]
mov dword [esp + 0x58], ecx
sub ecx, dword [esp + 0xbc]
add esi, dword [esp + 0xb8]
add ecx, dword [esp + 0x64]
dec eax
dec edi
mov dword [esp + 0x60], eax
lea edx, [ebx - 1]
mov dword [esp + 0x5c], esi
mov dword [esp + 0x3c], ecx
test eax, eax
js 0x487acc
mov ecx, dword [esp + 0x2c]
add ecx, 3
inc eax
mov byte [ecx], 0
add ecx, 4
dec eax
jne 0x487ac3
test edx, edx
js 0x487ae1
mov eax, dword [esp + 0x6c]
add eax, 3
inc edx
mov byte [eax], 0
add eax, 4
dec edx
jne 0x487ad8
or dword [esp + 0xc8], 0xff000000
xor eax, eax
test edi, edi
js 0x487b02
mov ecx, dword [esp + 0x54]
or dword [ecx + eax*4], 0xff000000
inc eax
cmp eax, edi
jle 0x487af6
cmp dword [esp + 0xc4], 0
mov dword [esp + 0x44], 0
jle 0x48803d
jmp 0x487b20
mov ecx, dword [esp + 0x44]
imul ecx, dword [esp + 0x88]
cmp dword [esp + 0xd0], 1
mov edx, dword [esp + 0x6c]
lea eax, [edx + ecx*4]
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 0x18], eax
jge 0x487d15
cmp eax, dword [esp + 0x3c]
jl 0x488027
mov ecx, dword [esp + 0x34]
imul eax, ecx
mov dword [esp + 0x28], eax
mov eax, ecx
neg eax
mov dword [esp + 0x68], eax
mov eax, 1
sub eax, dword [esp + 0x64]
mov dword [esp + 0x74], eax
jmp 0x487b80
mov ebp, dword [esp + 0x80]
cmp ebp, dword [esp + 0x5c]
jg 0x487cf5
mov ecx, dword [esp + 0x74]
add ecx, dword [esp + 0x18]
mov dword [esp + 0x30], ecx
lea ecx, [ecx]
mov eax, dword [esp + 0x50]
lea ecx, [eax + ebp - 1]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x30]
xor esi, esi
mov byte [esp + 0x14], 1
cmp eax, ecx
jl 0x487c30
mov edx, dword [esp + 0x28]
mov edi, dword [esp + 0x2c]
mov ebx, dword [esp + 0x34]
add edx, ebp
lea edx, [edi + edx*4]
neg ebx
add ebx, ebx
mov edi, eax
sub edi, ecx
add ebx, ebx
mov dword [esp + 0x38], edx
inc edi
nop
cmp ebp, dword [esp + 0x20]
jg 0x487c16
mov eax, dword [esp + 0x38]
mov ecx, ebp
lea esp, [esp]
mov edx, dword [esp + 0x7c]
mov edx, dword [edx + esi*4]
cmp dword [eax], edx
je 0x487c04
cmp edx, dword [esp + 0xd4]
jne 0x487c11
inc ecx
inc esi
add eax, 4
cmp ecx, dword [esp + 0x20]
jle 0x487bf0
jmp 0x487c16
mov byte [esp + 0x14], 0
add dword [esp + 0x38], ebx
dec edi
jne 0x487be0
cmp byte [esp + 0x14], 0
je 0x487cea
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x18]
cmp byte [esp + 0x17], 0
je 0x487c91
xor edx, edx
cmp eax, ecx
jl 0x487cd2
mov edi, dword [esp + 0x34]
mov eax, dword [esp + 0x28]
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x2c]
sub esi, dword [esp + 0x30]
neg edi
add eax, ebp
add edi, edi
lea ecx, [ecx + eax*4]
add edi, edi
mov dword [esp + 0x48], ecx
inc esi
cmp ebp, dword [esp + 0x20]
jg 0x487c82
mov eax, dword [esp + 0x20]
sub eax, ebp
inc eax
mov ebx, dword [esp + 0x54]
mov ebx, dword [ebx + edx*4]
mov dword [ecx], ebx
add ecx, 4
inc edx
dec eax
jne 0x487c72
mov ecx, dword [esp + 0x48]
add ecx, edi
dec esi
mov dword [esp + 0x48], ecx
jne 0x487c65
jmp 0x487cd2
cmp eax, ecx
jl 0x487cd2
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
mov esi, dword [esp + 0x34]
add edx, ebp
lea ebx, [eax + edx*4]
mov edx, dword [esp + 0x18]
sub edx, dword [esp + 0x30]
neg esi
add esi, esi
add esi, esi
inc edx
cmp ebp, dword [esp + 0x20]
jg 0x487ccd
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0xc8]
sub ecx, ebp
inc ecx
mov edi, ebx
rep stosd dword es:[edi], eax
add ebx, esi
dec edx
jne 0x487cb5
cmp byte [esp + 0xdc], 0
je 0x487ce6
cmp dword [esp + 0xd4], 0xffffffff
jne 0x487cea
mov ebp, dword [esp + 0x20]
inc ebp
cmp ebp, dword [esp + 0x5c]
jle 0x487ba0
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x68]
add dword [esp + 0x28], ecx
dec eax
mov dword [esp + 0x18], eax
cmp eax, dword [esp + 0x3c]
jge 0x487b80
jmp 0x488027
cmp eax, dword [esp + 0x3c]
jl 0x488027
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x58]
imul eax, ecx
mov dword [esp + 0x28], eax
mov eax, ecx
neg eax
mov dword [esp + 0x68], eax
mov eax, 1
sub eax, dword [esp + 0x64]
mov dword [esp + 0x74], eax
jmp 0x487d50
mov ebx, dword [esp + 0x80]
mov dword [esp + 0x48], ebx
cmp ebx, dword [esp + 0x5c]
jg 0x48800c
mov edx, dword [esp + 0x74]
add edx, dword [esp + 0x18]
mov dword [esp + 0x30], edx
mov ecx, dword [esp + 0x50]
mov eax, dword [esp + 0x18]
lea edx, [ecx + ebx - 1]
mov ecx, dword [esp + 0x30]
mov byte [esp + 0x14], 1
mov dword [esp + 0x20], edx
mov dword [esp + 0x38], 0
cmp eax, ecx
jl 0x487f31
mov edx, dword [esp + 0x34]
mov esi, dword [esp + 0x2c]
neg edx
add edx, edx
add edx, edx
mov dword [esp + 0x8c], edx
mov edx, dword [esp + 0x28]
sub eax, ecx
add edx, ebx
inc eax
lea edx, [esi + edx*4]
mov dword [esp + 0x40], eax
mov dword [esp + 0x84], edx
mov eax, edx
mov dword [esp + 0xb0], ebx
cmp ebx, dword [esp + 0x20]
jg 0x487eff
mov dword [esp + 0x78], eax
lea ecx, [ecx]
mov eax, dword [esp + 0xd4]
mov ecx, dword [esp + 0x7c]
mov edx, dword [esp + 0x38]
cmp dword [ecx + edx*4], eax
je 0x487ed2
mov esi, edx
mov al, byte [ecx + esi*4 + 2]
mov bl, byte [ecx + esi*4 + 1]
mov cl, byte [ecx + esi*4]
mov edx, dword [esp + 0xd0]
movzx esi, al
mov byte [esp + 0x15], cl
cmp edx, esi
jle 0x487e1e
mov byte [esp + 0x27], 0
jmp 0x487e26
mov cl, al
sub cl, dl
mov byte [esp + 0x27], cl
movzx ebp, bl
cmp edx, ebp
jle 0x487e34
mov byte [esp + 0x25], 0
jmp 0x487e3c
mov cl, bl
sub cl, dl
mov byte [esp + 0x25], cl
mov cl, byte [esp + 0x15]
movzx edi, cl
cmp edx, edi
jle 0x487e4e
mov byte [esp + 0x16], 0
jmp 0x487e54
sub cl, dl
mov byte [esp + 0x16], cl
mov ecx, 0xff
sub ecx, esi
cmp edx, ecx
jle 0x487e66
mov byte [esp + 0x24], 0xff
jmp 0x487e6d
lea ecx, [eax + edx]
mov byte [esp + 0x24], cl
mov eax, 0xff
sub eax, ebp
cmp edx, eax
jle 0x487e7f
mov byte [esp + 0x26], 0xff
jmp 0x487e86
lea eax, [ebx + edx]
mov byte [esp + 0x26], al
mov ecx, 0xff
sub ecx, edi
cmp edx, ecx
jle 0x487e96
or dl, 0xff
jmp 0x487e9a
add dl, byte [esp + 0x15]
mov esi, dword [esp + 0x78]
mov al, byte [esi + 2]
mov bl, byte [esi]
mov cl, byte [esi + 1]
mov byte [esp + 0x15], bl
cmp al, byte [esp + 0x27]
jb 0x487ef6
cmp al, byte [esp + 0x24]
ja 0x487ef6
cmp cl, byte [esp + 0x25]
jb 0x487ef6
cmp cl, byte [esp + 0x26]
ja 0x487ef6
mov al, bl
cmp al, byte [esp + 0x16]
jb 0x487ef6
cmp al, dl
ja 0x487ef6
mov ebx, dword [esp + 0x48]
mov eax, dword [esp + 0xb0]
add dword [esp + 0x78], 4
inc dword [esp + 0x38]
inc eax
mov dword [esp + 0xb0], eax
cmp eax, dword [esp + 0x20]
jle 0x487de0
jmp 0x487eff
mov ebx, dword [esp + 0x48]
mov byte [esp + 0x14], 0
mov eax, dword [esp + 0x84]
add eax, dword [esp + 0x8c]
dec dword [esp + 0x40]
mov dword [esp + 0x84], eax
jne 0x487dc8
cmp byte [esp + 0x14], 0
je 0x487ffd
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x30]
cmp byte [esp + 0x17], 0
je 0x487fa4
xor edx, edx
cmp eax, ecx
jl 0x487fe5
mov edi, dword [esp + 0x34]
mov eax, dword [esp + 0x28]
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x2c]
sub esi, dword [esp + 0x30]
neg edi
add eax, ebx
add edi, edi
lea ecx, [ecx + eax*4]
mov eax, dword [esp + 0x20]
add edi, edi
mov dword [esp + 0x40], ecx
inc esi
lea ebx, [ebx]
cmp ebx, eax
jg 0x487f95
sub eax, ebx
inc eax
jmp 0x487f80
mov ebp, dword [esp + 0x54]
mov ebp, dword [ebp + edx*4]
mov dword [ecx], ebp
add ecx, 4
inc edx
dec eax
jne 0x487f80
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x40]
add ecx, edi
dec esi
mov dword [esp + 0x40], ecx
jne 0x487f70
jmp 0x487fe5
cmp eax, ecx
jl 0x487fe5
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
mov esi, dword [esp + 0x34]
add edx, ebx
lea ebp, [eax + edx*4]
mov edx, dword [esp + 0x18]
sub edx, dword [esp + 0x30]
neg esi
add esi, esi
add esi, esi
inc edx
cmp ebx, dword [esp + 0x20]
jg 0x487fe0
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0xc8]
sub ecx, ebx
inc ecx
mov edi, ebp
rep stosd dword es:[edi], eax
add ebp, esi
dec edx
jne 0x487fc8
cmp byte [esp + 0xdc], 0
je 0x487ff9
cmp dword [esp + 0xd4], 0xffffffff
jne 0x487ffd
mov ebx, dword [esp + 0x20]
inc ebx
mov dword [esp + 0x48], ebx
cmp ebx, dword [esp + 0x5c]
jle 0x487d71
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x68]
add dword [esp + 0x28], ecx
dec eax
mov dword [esp + 0x18], eax
cmp eax, dword [esp + 0x3c]
jge 0x487d50
mov eax, dword [esp + 0x44]
inc eax
mov dword [esp + 0x44], eax
cmp eax, dword [esp + 0xc4]
jl 0x487b20
cmp dword [esp + 0xd8], 0xffffffff
je 0x4880a0
xor eax, eax
cmp byte [esp + 0x17], al
je 0x488077
cmp dword [esp + 0x60], eax
jl 0x4880a0
mov esi, dword [esp + 0xd8]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x60]
test dword [ecx + eax*4], 0xff000000
jne 0x488070
mov dword [ecx + eax*4], esi
inc eax
cmp eax, edx
jle 0x488064
jmp 0x4880a0
cmp dword [esp + 0x60], eax
jl 0x4880a0
mov edx, dword [esp + 0xc8]
mov edi, dword [esp + 0xd8]
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x60]
cmp dword [ecx + eax*4], edx
je 0x48809b
mov dword [ecx + eax*4], edi
inc eax
cmp eax, esi
jle 0x488093
mov eax, dword [esp + 0x54]
test eax, eax
je 0x4880b1
push eax
call fcn.004ca991
add esp, 4
mov bl, byte [esp + 0x1f]
mov edx, dword [esp + 0x6c]
push edx
call fcn.004ca991
add esp, 4
mov eax, dword [esp + 0x70]
push eax
call dword [sym.imp.GDI32.dll_DeleteDC]
test bl, bl
je 0x4880e9
mov ecx, dword [esp + 0x4c]
push ecx
call dword [sym.imp.GDI32.dll_DeleteObject]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x98
ret
mov eax, dword [esp + 0x4c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x98
ret