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

Disassembly:
sub esp, 0x64
push ebx
push ebp
mov ebp, dword [esp + 0x74]
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 4]
test edi, edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x2c], ebx
jle 0x4cf9d2
test ebx, ebx
jle 0x4cf9d2
fld1
fld st(0)
fsqrt
faddp st(1)
fmul qword [0x723578]
fmul qword [0x723820]
call fcn.006b24a0
mov dword [esp + 0x34], eax
mov eax, dword [ebp + 0x44]
mov dword [esp + 0x38], eax
lea eax, [edi + edi*2]
lea esi, [eax + 3]
and esi, 0xfffffffc
mov dword [esp + 0x40], esi
imul esi, ebx
cmp esi, 0xf4240
mov dword [esp + 0x44], eax
jbe 0x4cf644
call fcn.004c90f0
shr eax, 1
cmp eax, esi
jb 0x4cf65a
push 0x734220
push esi
call fcn.0069c1fd
add esp, 8
test eax, eax
mov dword [esp + 0x30], eax
jne 0x4cf689
push 0
call fcn.0069c8fa
mov ecx, dword [esp + 0x88]
mov edx, dword [esp + 0x84]
mov eax, dword [esp + 0x7c]
add esp, 4
push ecx
push edx
push ebp
push eax
call fcn.004cf490
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 0x10
mov esi, dword [esp + 0x78]
xor eax, eax
mov ecx, ebx
mov dword [esp + 0x54], eax
neg ecx
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
push esi
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x4c], 0x28
mov word [esp + 0x58], 1
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], ecx
mov word [esp + 0x5a], 0x18
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push ebx
push edi
push esi
mov ebp, eax
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov esi, eax
push esi
push ebp
call dword [sym.imp.GDI32.dll_SelectObject]
mov edx, dword [esp + 0x84]
mov ecx, dword [esp + 0x78]
push 0xcc0020
push edx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x88]
push eax
push ecx
push ebx
push edi
push 0
push 0
push ebp
call dword [sym.imp.GDI32.dll_BitBlt]
mov edx, dword [esp + 0x28]
push edx
push ebp
call dword [sym.imp.GDI32.dll_SelectObject]
push ebp
call dword [sym.imp.GDI32.dll_DeleteDC]
mov edi, dword [esp + 0x30]
mov ecx, dword [esp + 0x78]
push 0
lea eax, [esp + 0x4c]
push eax
push edi
push ebx
push 0
push esi
push ecx
call dword [sym.imp.GDI32.dll_GetDIBits]
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov esi, dword [esp + 0x7c]
mov eax, dword [esi]
cmp eax, 5
mov dword [esp + 0x14], 1
ja case.0x4cf768.4
jmp dword [eax*4 + 0x4cf9dc]
mov dword [esp + 0x14], 4
jmp case.0x4cf768.4
mov dword [esp + 0x14], 3
jmp case.0x4cf768.4
mov dword [esp + 0x14], 2
call fcn.004d14b0
mov ebp, eax
mov eax, edi
xor edi, edi
xor esi, esi
xor ecx, ecx
test ebx, ebx
mov dword [esp + 0x10], edi
jle 0x4cf992
mov ebx, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
imul ebx, edx
mov dword [esp + 0x3c], ebx
mov ebx, dword [esp + 0x2c]
mov dword [esp + 0x28], ebx
jmp 0x4cf7c4
mov edx, dword [esp + 0x20]
test edx, edx
jle 0x4cf96f
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x7c]
mov edx, dword [edx]
cmp edx, 6
ja case.0x4cf7df.4
jmp dword [edx*4 + 0x4cf9f4]
movzx edx, byte [ebp]
movzx edi, byte [ebp + 1]
movzx ecx, byte [ebp + 2]
movzx esi, byte [ebp + 3]
mov dword [esp + 0x10], edx
jmp 0x4cf8ee
movzx edx, byte [ebp + 2]
movzx ecx, byte [ebp]
movzx edi, byte [ebp + 1]
movzx esi, byte [ebp + 3]
mov dword [esp + 0x10], edx
jmp 0x4cf8ee
movzx edx, byte [ebp]
movzx edi, byte [ebp + 1]
movzx ecx, byte [ebp + 2]
mov dword [esp + 0x10], edx
mov esi, 0xff
jmp 0x4cf8ee
movzx edx, byte [ebp + 2]
movzx ecx, byte [ebp]
movzx edi, byte [ebp + 1]
mov dword [esp + 0x10], edx
mov esi, 0xff
jmp 0x4cf8ee
mov cx, word [ebp]
movzx edx, cl
mov word [esp + 0x18], cx
add cl, cl
movzx ebx, byte [esp + 0x19]
add cl, cl
add cl, cl
shr dl, 2
movzx ecx, cl
mov esi, 0xff
and edx, 7
or edx, ecx
mov ecx, dword [esp + 0x18]
mov edi, ecx
shr ecx, 3
movzx ecx, cl
shr edi, 9
and edi, 3
or edi, ecx
mov ecx, dword [esp + 0x18]
shr ecx, 0xd
and ecx, 7
mov dword [esp + 0x10], edx
or ecx, ebx
jmp 0x4cf8ee
mov cx, word [ebp]
mov word [esp + 0x1c], cx
mov edi, dword [esp + 0x1c]
sar cx, 0xf
mov edx, edi
shr edx, 2
movzx esi, cl
movzx ecx, dl
mov dl, byte [esp + 0x1c]
add dl, dl
add dl, dl
add dl, dl
mov ebx, ecx
and ebx, 7
movzx edx, dl
or edx, ebx
mov ebx, edi
shr ebx, 7
movzx ebx, bl
mov edi, ebx
and edi, 7
or edi, ecx
mov ecx, dword [esp + 0x1c]
shr ecx, 0xc
and ecx, 7
mov dword [esp + 0x10], edx
or ecx, ebx
jmp 0x4cf8ee
mov edx, dword [esp + 0x10]
imul esi, dword [esp + 0x34]
movzx ebx, byte [eax]
imul esi, esi, 0x101
sub edx, ebx
add esi, 0xff
shr esi, 0x10
imul edx, esi
imul edx, edx, 0x101
add edx, 0xff
shr edx, 0x10
add dl, byte [eax]
mov ebx, edi
mov byte [eax], dl
movzx edx, byte [eax + 1]
sub ebx, edx
imul ebx, esi
movzx edx, byte [eax + 2]
imul ebx, ebx, 0x101
add ebx, 0xff
shr ebx, 0x10
add bl, byte [eax + 1]
add ebp, dword [esp + 0x14]
mov byte [eax + 1], bl
mov ebx, ecx
sub ebx, edx
imul ebx, esi
imul ebx, ebx, 0x101
add ebx, 0xff
shr ebx, 0x10
add bl, byte [eax + 2]
add eax, 3
sub dword [esp + 0x24], 1
mov byte [eax - 1], bl
jne 0x4cf7d0
mov edx, dword [esp + 0x38]
sub edx, dword [esp + 0x3c]
add ebp, edx
mov edx, dword [esp + 0x40]
sub edx, dword [esp + 0x44]
add eax, edx
sub dword [esp + 0x28], 1
jne 0x4cf7c0
mov ebx, dword [esp + 0x2c]
mov esi, dword [esp + 0x30]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x84]
push 0
lea eax, [esp + 0x4c]
push eax
mov eax, dword [esp + 0x88]
push esi
push ebx
push 0
push 0
push 0
push ebx
push ecx
mov ecx, dword [esp + 0x9c]
push edx
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetDIBitsToDevice]
push esi
call fcn.0069c8fa
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 0x10