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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x46ef68
push eax
mov dword fs:[0], esp
sub esp, 0x5c
push ebx
push esi
push edi
mov edi, dword [esp + 0x7c]
xor ebx, ebx
cmp edi, ebx
je 0x4160fc
mov esi, dword [esp + 0x80]
cmp esi, ebx
je 0x4160fc
lea ecx, [esp + 0x44]
call fcn.00414510
push edi
lea ecx, [esp + 0x48]
mov dword [esp + 0x74], ebx
call fcn.004146e0
test al, al
jne 0x416110
lea ecx, [esp + 0x44]
mov dword [esp + 0x70], 0xffffffff
call fcn.00414560
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [esp + 0x5c]
mov dword fs:[0], ecx
add esp, 0x68
ret
mov ecx, 0x48efa8
call fcn.0040a840
test al, al
jne 0x416159
mov al, byte [0x48f1fa]
test al, al
jne 0x41612d
mov ebx, dword [esp + 0x78]
jmp 0x416159
mov eax, dword [0x48f1f8]
test ah, ah
jne 0x416159
and eax, 0xff
je 0x416159
imul eax, dword [esp + 0x78]
mov ecx, eax
mov eax, 0x80808081
imul ecx
add edx, ecx
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
mov ebx, edx
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x60]
mov dword [esp + 0x14], ecx
push ebp
mov ecx, 0x48f3c8
mov dword [esp + 0x84], ebx
mov dword [esp + 0x7c], edx
call fcn.004182f0
mov edi, dword [esp + 0x88]
mov ebp, dword [esp + 0x8c]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x90]
sub eax, edi
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x94]
sub eax, ebp
mov dword [esp + 0x24], eax
xor eax, eax
cmp ebx, eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x10], eax
jbe 0x41633f
mov ecx, 0x48f3c8
call fcn.004182f0
mov ecx, eax
mov eax, dword [esp + 0x1c]
sub ecx, eax
mov dword [esp + 0x14], ecx
je 0x416335
mov eax, dword [esp + 0x7c]
mov edx, dword [esi]
push 0
push ebp
mov ebx, dword [eax]
push edi
mov ecx, esi
call dword [edx + 0x50]
push eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x4c]
mov ecx, dword [esp + 0x90]
push eax
push ebp
push edi
push ecx
mov ecx, dword [esp + 0x9c]
call dword [ebx + 0x10]
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x50]
mov ebx, eax
mov eax, dword [esi]
mov ecx, esi
add ebx, ebp
call dword [eax + 0x4c]
add eax, edi
push ebx
push eax
push ebp
lea ecx, [esp + 0x34]
push edi
push ecx
call dword [0x4734cc]
mov ecx, dword [esp + 0x14]
mov ebx, dword [esp + 0x84]
mov eax, ecx
xor edx, edx
shl eax, 0xa
div ebx
cmp eax, 0x400
jle 0x416252
mov eax, 0x400
cmp eax, dword [esp + 0x10]
je 0x416335
mov dword [esp + 0x10], eax
mov edi, eax
imul eax, dword [esp + 0x24]
imul edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x8c]
mov ecx, dword [esp + 0x88]
mov edx, dword [esp + 0x7c]
push 3
sar eax, 0xa
add eax, ebx
mov ebx, dword [edx]
sar edi, 0xa
mov ebp, eax
mov eax, dword [esi]
add edi, ecx
push 0
push 0
mov ecx, esi
call dword [eax + 0x50]
mov edx, dword [esi]
push eax
mov ecx, esi
call dword [edx + 0x4c]
mov ecx, dword [esp + 0x8c]
push eax
push ebp
push edi
push esi
call dword [ebx + 0x10]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x50]
mov edx, dword [esi]
mov ebx, eax
mov ecx, esi
add ebx, ebp
call dword [edx + 0x4c]
add eax, edi
lea ecx, [esp + 0x28]
mov dword [esp + 0x40], eax
lea eax, [esp + 0x38]
push eax
lea edx, [esp + 0x2c]
push ecx
push edx
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], ebp
mov dword [esp + 0x50], ebx
call dword [0x47348c]
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x34]
mov ebx, dword [esp + 0x2c]
sub edx, eax
lea eax, [esp + 0x50]
sub ecx, ebx
push 0xcc0020
neg eax
sbb eax, eax
push ebx
and eax, dword [esp + 0x5c]
mov ebx, dword [esp + 0x30]
push ebx
push eax
mov eax, dword [esp + 0x3c]
push ecx
mov ecx, dword [esp + 0x2c]
push edx
push eax
mov edx, dword [ecx + 4]
push ebx
push edx
call dword [0x4730f4]
mov ecx, dword [esp + 0x14]
mov ebx, dword [esp + 0x84]
cmp ecx, ebx
jb 0x4161c5
xor eax, eax
mov ecx, dword [esp + 0x7c]
mov edx, dword [esi]
push eax
push ebp
mov ebx, dword [ecx]
push edi
mov ecx, esi
call dword [edx + 0x50]
push eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x4c]
mov ecx, dword [esp + 0x90]
push eax
push ebp
push edi
push ecx
mov ecx, dword [esp + 0x9c]
call dword [ebx + 0x10]
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x50]
mov ebx, eax
mov eax, dword [esi]
mov ecx, esi
add ebx, ebp
call dword [eax + 0x4c]
add eax, edi
push ebx
push eax
push ebp
lea ecx, [esp + 0x34]
push edi
push ecx
call dword [0x4734cc]
mov edi, dword [esp + 0x7c]
mov edx, dword [esi]
push 3
push 0
mov ebx, dword [edi]
push 0
mov ecx, esi
call dword [edx + 0x50]
push eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x4c]
mov ebp, dword [esp + 0xa4]
mov edx, ebx
mov ebx, dword [esp + 0xa0]
push eax
push ebp
push ebx
push esi
mov ecx, edi
call dword [edx + 0x10]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x50]
mov edx, dword [esi]
mov edi, eax
mov ecx, esi
add edi, ebp
call dword [edx + 0x4c]
add eax, ebx
lea ecx, [esp + 0x28]
mov dword [esp + 0x40], eax
lea eax, [esp + 0x38]
push eax
lea edx, [esp + 0x2c]
push ecx
push edx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebp
mov dword [esp + 0x50], edi
call dword [0x47348c]
mov ecx, dword [esp + 0x34]
mov edi, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
sub ecx, edi
mov eax, dword [esp + 0x28]
push 0xcc0020
sub edx, eax
lea eax, [esp + 0x54]
neg eax
sbb eax, eax
push edi
and eax, dword [esp + 0x5c]
mov edi, dword [esp + 0x30]
push edi
push eax
mov eax, dword [esp + 0x3c]
push ecx
mov ecx, dword [esp + 0x2c]
push edx
push eax
mov edx, dword [ecx + 4]
push edi
push edx
call dword [0x4730f4]
mov eax, dword [esp + 0x80]
mov edx, dword [esi]
push 3
push 0
mov edi, dword [eax]
push 0
mov ecx, esi
call dword [edx + 0x50]
push eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x4c]
mov ecx, dword [esp + 0x90]
push eax
push ebp
push ebx
push esi
call dword [edi + 0x10]
lea ecx, [esp + 0x48]
mov dword [esp + 0x74], 0xffffffff
call fcn.00414560
mov ecx, dword [esp + 0x6c]
pop ebp
pop edi
pop esi
mov al, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x68
ret