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

Disassembly:
sub esp, 0x4dc
push ebx
push ebp
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esp + 0x4f0]
mov dword [esp + 0x5c], eax
lea eax, [esp + 0x78]
push eax
push 0x54
push ecx
call dword [sym.imp.GDI32.dll_GetObjectA]
test eax, eax
je 0x47b2f4
mov ecx, dword [esp + 0x4f4]
mov edx, dword [esp + 0x8c]
lea eax, [esp + 0xec]
mov dword [esp + 0x60], edx
push eax
push 0x100
push 0
push ecx
call dword [sym.imp.GDI32.dll_GetPaletteEntries]
mov edi, dword [esp + 0x4f8]
mov ebx, eax
mov eax, dword [esp + 0x94]
mov dword [esp + 0x2c], ebx
cmp eax, edi
jl 0x47b2f4
mov ebp, dword [esp + 0x4fc]
mov eax, dword [esp + 0x98]
cmp eax, ebp
jl 0x47b2f4
mov edx, dword [esp + 0x84]
lea eax, [edi + 3]
add edx, 3
and al, 0xfc
and edx, 0xfffffffc
push 0x428
mov dword [esp + 0x88], edx
mov dword [esp + 0x68], eax
call fcn.004be967
mov esi, eax
mov eax, 0x48
xor edx, edx
add esp, 4
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
xor eax, eax
cmp ebx, edx
mov dword [esi], 0x28
mov dword [esi + 4], edi
mov dword [esi + 8], ebp
mov word [esi + 0xc], 1
mov word [esi + 0xe], 8
mov dword [esi + 0x14], edx
mov dword [esi + 0x10], edx
mov dword [esi + 0x20], ebx
mov dword [esi + 0x24], ebx
jle 0x47b25c
lea ecx, [esi + 0x28]
mov word [ecx], ax
inc eax
add ecx, 2
cmp eax, ebx
jl 0x47b251
push edx
mov dword [esp + 0x38], edx
call dword [sym.imp.USER32.dll_GetDC]
mov ebp, eax
push ebp
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push ebp
push 0
mov edi, eax
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [esp + 0x4f0]
mov ebp, dword [sym.imp.GDI32.dll_SelectObject]
push eax
push edi
call ebp
lea ecx, [esp + 0x70]
mov dword [esp + 0x1c], eax
push ecx
push 2
push 0
push edi
call dword [sym.imp.GDI32.dll_GetDIBColorTable]
mov edx, dword [esp + 0x1c]
push edx
push edi
call ebp
mov eax, dword [esp + 0x4f4]
push 0
push eax
push edi
call dword [sym.imp.GDI32.dll_SelectPalette]
push 0
lea ecx, [esp + 0x38]
push 0
push ecx
push 1
push esi
push edi
mov dword [esp + 0x30], eax
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x1c], eax
push edx
push edi
call ebp
push edi
call dword [sym.imp.GDI32.dll_DeleteDC]
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x47b301
push esi
call fcn.004be975
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x4dc
ret
fild dword [esp + 0x98]
mov al, byte [esp + 0xed]
mov cl, byte [esp + ebx*4 + 0xe9]
mov dl, byte [esp + 0x71]
mov bl, byte [esp + 0x75]
fidiv dword [esp + 0x4fc]
cmp al, cl
sbb ecx, ecx
neg ecx
cmp dl, bl
sbb eax, eax
xor edx, edx
neg eax
cmp eax, ecx
sete dl
mov dword [esp + 0x68], edx
fstp qword [esp + 0x50]
fild dword [esp + 0x94]
fidiv dword [esp + 0x4f8]
fstp qword [esp + 0x48]
fld qword [esp + 0x50]
fmul qword [0x4ccfa8]
call fcn.004bedcc
mov esi, 1
cmp eax, esi
mov dword [esp + 0x24], esi
jl 0x47b372
mov dword [esp + 0x24], eax
fld qword [esp + 0x48]
fmul qword [0x4ccfa8]
call fcn.004bedcc
cmp eax, esi
mov dword [esp + 0x28], esi
jl 0x47b38d
mov dword [esp + 0x28], eax
mov ebp, dword [esp + 0x4fc]
lea eax, [ebp*8]
push eax
call fcn.004be967
mov ebx, dword [esp + 0x4fc]
mov dword [esp + 0x24], eax
lea ecx, [ebx*8]
push ecx
call fcn.004be967
add esp, 8
xor esi, esi
test ebx, ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], esi
jle 0x47b416
fld qword [esp + 0x48]
mov edi, eax
fild dword [esp + 0x10]
fmul st(1)
call fcn.004bedcc
xor edx, edx
test eax, eax
setle dl
dec edx
and eax, edx
inc esi
mov dword [esp + 0x14], esi
mov dword [edi], eax
fild dword [esp + 0x14]
fmul st(1)
call fcn.004bedcc
mov ecx, dword [esp + 0x94]
dec eax
dec ecx
cmp eax, ecx
jl 0x47b406
mov eax, ecx
mov dword [edi + 4], eax
add edi, 8
cmp esi, ebx
mov dword [esp + 0x10], esi
jl 0x47b3d0
fstp st(0)
xor esi, esi
test ebp, ebp
mov dword [esp + 0x10], esi
jle 0x47b5ca
mov edi, dword [esp + 0x20]
fld qword [esp + 0x50]
fild dword [esp + 0x10]
fmul st(1)
call fcn.004bedcc
xor edx, edx
test eax, eax
setle dl
dec edx
and eax, edx
inc esi
mov dword [esp + 0x14], esi
mov dword [edi], eax
fild dword [esp + 0x14]
fmul st(1)
call fcn.004bedcc
mov ecx, dword [esp + 0x98]
dec eax
dec ecx
cmp eax, ecx
jl 0x47b462
mov eax, ecx
mov dword [edi + 4], eax
add edi, 8
cmp esi, ebp
mov dword [esp + 0x10], esi
jl 0x47b42c
test ebp, ebp
fstp st(0)
jle 0x47b5ca
mov edx, dword [esp + 0x20]
xor esi, esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x30], edx
mov dword [esp + 0x38], ebp
mov edi, dword [esp + 0x34]
mov eax, dword [edx]
mov ecx, dword [edx + 4]
add esi, edi
test ebx, ebx
mov dword [esp + 0x58], eax
mov dword [esp + 0x48], ecx
mov dword [esp + 0x14], esi
jle 0x47b5a6
mov edx, dword [esp + 0x28]
mov esi, dword [esp + 0x18]
sar edx, 1
add edx, eax
mov dword [esp + 0x44], esi
mov dword [esp + 0x6c], edx
mov dword [esp + 0x40], ebx
jmp 0x47b4c9
mov eax, dword [esp + 0x58]
imul eax, dword [esp + 0x84]
mov edi, dword [esp + 0x60]
mov edx, dword [esi]
mov ebp, dword [esi + 4]
add eax, edi
mov edi, dword [esp + 0x6c]
xor ebx, ebx
cmp edi, ecx
mov dword [esp + 0x10], ebx
jg 0x47b540
mov esi, dword [esp + 0x24]
sar esi, 1
add esi, edx
mov dword [esp + 0x50], esi
mov esi, dword [esp + 0x50]
cmp esi, ebp
jg 0x47b529
mov ecx, esi
mov edx, 0x80
and ecx, 7
sar edx, cl
mov ecx, esi
sar ecx, 3
mov cl, byte [ecx + eax]
test cl, dl
je 0x47b51a
inc dword [esp + 0x10]
mov edx, dword [esp + 0x24]
inc ebx
add esi, edx
cmp esi, ebp
jle 0x47b4fe
mov ecx, dword [esp + 0x48]
mov esi, dword [esp + 0x28]
mov edx, dword [esp + 0x84]
add edi, esi
add eax, edx
cmp edi, ecx
jle 0x47b4f6
mov esi, dword [esp + 0x44]
mov eax, dword [esp + 0x68]
test eax, eax
je 0x47b565
mov edx, dword [esp + 0x2c]
lea eax, [edx - 1]
imul eax, dword [esp + 0x10]
cdq
idiv ebx
mov edx, dword [esp + 0x14]
inc edx
mov dword [esp + 0x14], edx
mov byte [edx - 1], al
jmp 0x47b585
mov eax, dword [esp + 0x2c]
dec eax
imul eax, dword [esp + 0x10]
cdq
idiv ebx
mov dl, byte [esp + 0x2c]
sub dl, al
mov eax, dword [esp + 0x14]
dec dl
mov byte [eax], dl
inc eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x40]
add esi, 8
dec eax
mov dword [esp + 0x44], esi
mov dword [esp + 0x40], eax
jne 0x47b4c5
mov edx, dword [esp + 0x30]
mov ebx, dword [esp + 0x4f8]
mov esi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x64]
mov eax, dword [esp + 0x38]
add edx, 8
add esi, ecx
dec eax
mov dword [esp + 0x30], edx
mov dword [esp + 0x3c], esi
mov dword [esp + 0x38], eax
jne 0x47b48c
mov eax, dword [esp + 0x18]
push eax
call fcn.004be975
mov ecx, dword [esp + 0x24]
push ecx
call fcn.004be975
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, dword [esp + 0x5c]
lea edx, [esp + 0xcc]
sub eax, edi
push eax
push str._d_ms
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [esp + 0x28]
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4dc
ret