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

Disassembly:
push 0xffffffffffffffff
push 0x57d9d8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x6c
mov eax, dword [esp + 0x8c]
push ebx
push ebp
push esi
mov esi, ecx
cmp eax, 0x64
push edi
mov dword [esp + 0x1c], esi
je 0x4c39ed
mov ebp, dword [esp + 0x98]
mov edx, dword [esp + 0x90]
sub ebp, edx
xor ebx, ebx
cmp ebp, ebx
mov dword [esp + 0x28], ebp
jle 0x4c39ed
mov edi, dword [esp + 0x94]
mov edx, dword [esp + 0x8c]
sub edi, edx
cmp edi, ebx
mov dword [esp + 0x2c], edi
jle 0x4c39ed
cmp dword [0x5d20cc], 8
jg 0x4c3a07
mov ecx, dword [esi + 4]
lea eax, [esp + 0x8c]
push eax
push ecx
call fcn.004eb4a0
add esp, 8
mov eax, 1
mov ecx, dword [esp + 0x7c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x78
ret 0x20
cmp dword [esp + 0xa8], 0xffffffff
je 0x4c3a1a
cmp eax, 0x64
jle 0x4c3a1a
xor eax, eax
jmp 0x4c39f2
lea ecx, [esp + 0x40]
call fcn.004631b4
mov eax, dword [esi + 4]
mov dword [esp + 0x84], ebx
cmp eax, ebx
jne 0x4c3a35
xor eax, eax
jmp 0x4c3a38
mov eax, dword [eax + 4]
push eax
call dword [0x587094]
push eax
lea ecx, [esp + 0x44]
call fcn.004631ae
cmp eax, ebx
jne 0x4c3a65
lea ecx, [esp + 0x40]
mov dword [esp + 0x84], 0xffffffff
call fcn.004631a2
xor eax, eax
jmp 0x4c39f2
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x38], 0x588d64
mov eax, dword [esi + 4]
push ebp
push edi
mov byte [esp + 0x8c], 1
mov edx, dword [eax + 4]
push edx
call dword [0x587098]
push eax
lea ecx, [esp + 0x3c]
call fcn.00463076
cmp eax, ebx
jne 0x4c3ad2
mov dword [esp + 0x38], 0x588b4c
lea ecx, [esp + 0x38]
mov byte [esp + 0x84], 2
call fcn.00463082
lea ecx, [esp + 0x40]
mov dword [esp + 0x38], 0x5889b0
mov dword [esp + 0x84], 0xffffffff
call fcn.004631a2
xor eax, eax
jmp 0x4c39f2
mov ecx, dword [esp + 0x3c]
lea eax, [esp + 0x38]
neg eax
sbb eax, eax
and eax, ecx
push eax
mov eax, dword [esp + 0x48]
push eax
call fcn.004631c0
mov esi, ebp
push ebx
imul esi, edi
lea ecx, [esp + 0x14]
push ebx
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x4c]
push ecx
lea edx, [esp + 0x5c]
push ebx
push edx
push eax
mov dword [esp + 0x68], 0x28
mov dword [esp + 0x6c], edi
mov dword [esp + 0x70], ebp
mov word [esp + 0x74], 1
mov word [esp + 0x76], 0x20
mov dword [esp + 0x78], ebx
mov dword [esp + 0x7c], esi
mov dword [esp + 0x80], ebx
mov dword [esp + 0x84], ebx
mov dword [esp + 0x88], ebx
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x28], ebx
call dword [0x5870b8]
cmp eax, ebx
mov dword [esp + 0x34], eax
je 0x4c3f36
cmp dword [esp + 0x10], ebx
je 0x4c3f36
mov ecx, dword [esp + 0x44]
push eax
push ecx
call dword [0x5870b4]
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + 4]
cmp eax, ebx
jne 0x4c3b83
xor eax, eax
jmp 0x4c3b86
mov eax, dword [eax + 4]
mov ecx, dword [esp + 0x90]
mov edx, dword [esp + 0x8c]
push 0xcc0020
push ecx
push edx
push eax
mov eax, dword [esp + 0x54]
push ebp
push edi
push ebx
push ebx
push eax
call dword [0x5870b0]
mov ebx, dword [esp + 0xa0]
cmp ebx, 0xffffffff
je 0x4c3bd4
xor ecx, ecx
mov cl, bh
mov ch, bl
shr ebx, 0x10
shl ecx, 8
and ebx, 0xff
or ecx, ebx
mov dword [esp + 0xa0], ecx
mov ebx, ecx
test esi, esi
jle 0x4c3ea0
mov dword [esp + 0x18], esi
mov edx, dword [esp + 0x10]
mov esi, dword [esp + 0xa4]
test esi, esi
mov ecx, dword [edx]
jle 0x4c3c4f
mov eax, ecx
mov edx, ebx
and eax, 0xff
and edx, 0xff
sub eax, edx
cdq
xor eax, edx
sub eax, edx
cmp eax, esi
jge 0x4c3c5e
xor eax, eax
xor edx, edx
mov al, ch
mov dl, bh
and eax, 0xff
and edx, 0xff
sub eax, edx
cdq
xor eax, edx
sub eax, edx
cmp eax, esi
jge 0x4c3c5e
mov eax, ecx
mov edx, ebx
shr eax, 0x10
shr edx, 0x10
and eax, 0xff
and edx, 0xff
sub eax, edx
cdq
xor eax, edx
sub eax, edx
cmp eax, esi
jl 0x4c3e86
jmp 0x4c3c5e
xor eax, eax
cmp ecx, ebx
sete al
test eax, eax
jne 0x4c3e86
mov edx, dword [esp + 0x9c]
or eax, 0xffffffff
cmp edx, eax
jne 0x4c3d32
mov ebx, dword [0x5d1f9c]
mov edx, ecx
mov eax, ebx
and edx, 0xff
shr eax, 0x10
and eax, 0xff
mov esi, 0xff
lea edx, [eax + edx*2]
mov eax, 0x55555556
imul edx
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp edx, 0xff
jg 0x4c3ca8
mov esi, edx
xor edx, edx
xor eax, eax
mov dl, ch
mov al, bh
and edx, 0xff
and eax, 0xff
mov dword [esp + 0x14], 0xff
lea edx, [eax + edx*2]
mov eax, 0x55555556
imul edx
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp edx, 0xff
jg 0x4c3ce0
mov dword [esp + 0x14], edx
shr ecx, 0x10
and ecx, 0xff
and ebx, 0xff
mov eax, 0x55555556
lea ecx, [ebx + ecx*2]
imul ecx
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
cmp edx, 0xff
jle 0x4c3d0d
mov edx, 0xff
mov ecx, dword [esp + 0x10]
xor eax, eax
mov ah, dl
mov ebx, dword [esp + 0xa0]
mov al, byte [esp + 0x14]
and esi, 0xff
shl eax, 8
or eax, esi
mov dword [ecx], eax
jmp 0x4c3e86
cmp dword [esp + 0xa8], eax
jne 0x4c3d6e
fild dword [esp + 0x9c]
fmul qword [0x591940]
fstp qword [esp + 0x20]
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
push eax
push edx
push eax
push edx
push eax
push edx
push ecx
call fcn.004c5460
mov edx, dword [esp + 0x2c]
add esp, 0x1c
mov dword [edx], eax
jmp 0x4c3e86
mov esi, dword [esp + 0xa8]
mov eax, dword [esp + 0x9c]
mov ebp, dword [0x587288]
mov edi, ecx
xor ebx, ebx
and edi, 0xff
shr esi, 0x10
mov bl, ch
and esi, 0xff
shr ecx, 0x10
sub esi, edi
push 0x64
and ecx, 0xff
push eax
push esi
and ebx, 0xff
mov dword [esp + 0x2c], ecx
call ebp
add eax, edi
cmp eax, 0xff
jle 0x4c3dc2
mov ebp, 0xff
jmp 0x4c3dd3
mov ecx, dword [esp + 0x9c]
push 0x64
push ecx
push esi
call ebp
mov ebp, eax
add ebp, edi
mov eax, dword [esp + 0x9c]
xor edx, edx
mov dl, byte [esp + 0xa9]
mov edi, dword [0x587288]
and edx, 0xff
push 0x64
mov esi, edx
push eax
sub esi, ebx
push esi
call edi
add eax, ebx
cmp eax, 0xff
jle 0x4c3e0c
mov dword [esp + 0x14], 0xff
jmp 0x4c3e1f
mov ecx, dword [esp + 0x9c]
push 0x64
push ecx
push esi
call edi
add eax, ebx
mov dword [esp + 0x14], eax
mov esi, dword [esp + 0xa8]
mov ebx, dword [esp + 0x20]
mov edx, dword [esp + 0x9c]
and esi, 0xff
sub esi, ebx
push 0x64
push edx
push esi
call edi
add eax, ebx
cmp eax, 0xff
jle 0x4c3e4f
mov eax, 0xff
jmp 0x4c3e5e
mov eax, dword [esp + 0x9c]
push 0x64
push eax
push esi
call edi
add eax, ebx
mov edx, dword [esp + 0x10]
xor ecx, ecx
mov ch, al
mov ebx, dword [esp + 0xa0]
mov cl, byte [esp + 0x14]
mov edi, dword [esp + 0x2c]
shl ecx, 8
and ebp, 0xff
or ecx, ebp
mov ebp, dword [esp + 0x28]
mov dword [edx], ecx
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
add ecx, 4
dec eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], eax
jne 0x4c3be0
mov eax, dword [esp + 0x1c]
mov esi, dword [esp + 0x44]
mov edx, dword [esp + 0x90]
push 0xcc0020
mov ecx, dword [eax + 4]
lea eax, [esp + 0x44]
neg eax
mov ecx, dword [ecx + 4]
push 0
sbb eax, eax
push 0
and eax, esi
push eax
mov eax, dword [esp + 0x9c]
push ebp
push edi
push edx
push eax
push ecx
call dword [0x5870b0]
mov eax, dword [esp + 0x30]
test eax, eax
je 0x4c3ee6
mov eax, dword [eax + 4]
mov edx, dword [esp + 0x44]
push eax
push edx
call fcn.004631c0
mov eax, dword [esp + 0x34]
push eax
call dword [0x5870ac]
mov dword [esp + 0x38], 0x588b4c
lea ecx, [esp + 0x38]
mov byte [esp + 0x84], 4
call fcn.00463082
lea ecx, [esp + 0x40]
mov dword [esp + 0x38], 0x5889b0
mov dword [esp + 0x84], 0xffffffff
call fcn.004631a2
jmp 0x4c39ed
mov dword [esp + 0x38], 0x588b4c
lea ecx, [esp + 0x38]
mov byte [esp + 0x84], 3
call fcn.00463082
lea ecx, [esp + 0x40]
mov dword [esp + 0x38], 0x5889b0
mov dword [esp + 0x84], 0xffffffff
call fcn.004631a2
xor eax, eax
jmp 0x4c39f2