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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
lea eax, [esp - 0x14]
cmp eax, dword [ecx + 8]
jbe 0x4796ac
sub esp, 0x94
lea edi, [esp + 0xb8]
xor eax, eax
call fcn.0045dabb
mov ecx, dword [esp + 0xb4]
test ecx, ecx
jne 0x47921e
jmp 0x479693
mov eax, dword [esp + 0x9c]
dec eax
mov dword [esp + 0x34], eax
mov ecx, dword [esp + 0x98]
mov dword [esp], ecx
mov dword [esp + 4], eax
mov dword [esp + 8], 0xc
call fcn.004790f0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], ecx
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x98], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x34]
inc eax
mov dword [esp + 0x9c], eax
mov eax, dword [esp + 0xb0]
mov ecx, dword [esp + 0xac]
mov dword [esp], ecx
mov dword [esp + 4], eax
mov dword [esp + 8], 0x3b9aca00
call fcn.004790f0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], ecx
mov eax, dword [esp + 0x3c]
mov dword [esp + 0xac], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0xb0], eax
mov eax, dword [esp + 0xac]
mov ecx, dword [esp + 0xa8]
mov dword [esp], ecx
mov dword [esp + 4], eax
mov dword [esp + 8], 0x3c
call fcn.004790f0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], ecx
mov eax, dword [esp + 0x3c]
mov dword [esp + 0xa8], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0xac], eax
mov eax, dword [esp + 0xa8]
mov ecx, dword [esp + 0xa4]
mov dword [esp], ecx
mov dword [esp + 4], eax
mov dword [esp + 8], 0x3c
call fcn.004790f0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], ecx
mov eax, dword [esp + 0x3c]
mov dword [esp + 0xa4], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0xa8], eax
mov eax, dword [esp + 0xa4]
mov ecx, dword [esp + 0xa0]
mov dword [esp], ecx
mov dword [esp + 4], eax
mov dword [esp + 8], 0x18
call fcn.004790f0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], ecx
mov eax, dword [esp + 0x3c]
mov dword [esp + 0xa0], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0xa4], eax
mov eax, dword [esp + 0x98]
mov dword [esp], eax
call fcn.00478b30
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
mov dword [esp + 0x64], eax
mov dword [esp + 0x60], ecx
mov edx, dword [esp + 0x9c]
lea ebx, [edx - 1]
cmp ebx, 0xd
jb 0x4793c7
jmp 0x479687
lea ebx, [0x514c40]
lea edx, [ebx + edx*4 - 4]
mov edx, dword [edx]
mov ebx, ecx
add ecx, edx
mov dword [esp + 0x60], ecx
mov ecx, edx
sar edx, 0x1f
add ebx, ecx
adc eax, edx
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x98]
mov dword [esp], eax
call fcn.00479050
movzx eax, byte [esp + 4]
mov byte [esp + 0x2e], al
mov byte [esp + 0x2f], al
test al, al
jne 0x47940a
jmp 0x47941b
cmp dword [esp + 0x9c], 3
setge cl
mov byte [esp + 0x2f], cl
jmp 0x47941d
jmp 0x47941d
movzx ecx, byte [esp + 0x2f]
test cl, cl
jne 0x479428
jmp 0x479440
mov ecx, dword [esp + 0x60]
add ecx, 1
mov edx, dword [esp + 0x64]
mov dword [esp + 0x60], ecx
adc edx, 0
mov dword [esp + 0x64], edx
jmp 0x479442
jmp 0x479442
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0xa0]
dec edx
mov ebx, ecx
add ecx, edx
mov eax, ecx
mov ebp, 0x15180
mov esi, edx
mul ebp
mov ebp, dword [esp + 0x64]
mov dword [esp + 0x60], ecx
mov ecx, esi
sar esi, 0x1f
add ebx, ecx
adc ebp, esi
mov dword [esp + 0x64], ebp
mov dword [esp + 0x68], eax
imul ecx, ebp, 0x15180
add ecx, edx
mov dword [esp + 0x6c], ecx
mov edx, dword [esp + 0xa4]
imul edx, edx, 0xe10
mov ebx, dword [esp + 0xa8]
imul ebx, ebx, 0x3c
add edx, ebx
add edx, dword [esp + 0xac]
mov ebx, eax
add eax, edx
mov ebp, eax
add eax, 0xe5263700
mov dword [esp + 0x68], ebp
mov esi, edx
sar edx, 0x1f
add ebx, esi
adc ecx, edx
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x48], eax
add ebp, 0xe5263700
adc ecx, 0x80000001
mov dword [esp + 0x4c], ecx
mov edx, dword [esp + 0xb4]
mov dword [esp], edx
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
call fcn.004797a0
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x20]
mov esi, dword [esp + 0x24]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x78], edx
mov dword [esp + 0x74], esi
mov dword [esp + 0x70], ebp
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x7c]
mov dword [esp + 0x50], ecx
mov dword [esp + 0x54], edx
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x74]
mov dword [esp + 0x58], ecx
mov dword [esp + 0x5c], edx
mov ecx, dword [esp + 0x30]
test ecx, ecx
jne 0x479546
jmp 0x479622
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x30]
mov edx, eax
sub eax, ecx
mov ebx, dword [esp + 0x4c]
mov dword [esp + 0x40], eax
mov ebp, ecx
sar ecx, 0x1f
sub edx, ebp
sbb ebx, ecx
mov dword [esp + 0x44], ebx
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x50]
cmp ecx, ebx
xchg ebp, ebx
setg bl
xchg ebp, ebx
cmp ecx, ebx
sete cl
cmp edx, eax
seta al
and ecx, eax
or ebp, ecx
xchg ebp, eax
mov byte [esp + 0x2f], al
xchg ebp, eax
xchg ebp, eax
test al, al
xchg ebp, eax
jne 0x479594
jmp 0x479596
jmp 0x4795c5
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x40]
mov ebx, dword [esp + 0x58]
cmp ecx, eax
xchg ebp, ebx
setl bl
xchg ebp, ebx
cmp ecx, eax
sete al
cmp ebx, edx
setbe cl
and eax, ecx
or ebp, eax
xchg ebp, eax
mov byte [esp + 0x2f], al
xchg ebp, eax
jmp 0x4795c5
movzx eax, byte [esp + 0x2f]
test al, al
jne 0x4795d0
jmp 0x4795fd
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0xb4]
mov dword [esp], edx
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
call fcn.004797a0
mov eax, dword [esp + 0x14]
mov dword [esp + 0x38], eax
mov dword [esp + 0x30], eax
jmp 0x4795ff
jmp 0x4795ff
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x30]
mov edx, eax
sub eax, ecx
mov ebx, dword [esp + 0x4c]
mov dword [esp + 0x48], eax
mov eax, ecx
sar ecx, 0x1f
sub edx, eax
sbb ebx, ecx
mov dword [esp + 0x4c], ebx
jmp 0x479624
jmp 0x479624
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0xb0]
mov dword [esp + 4], ecx
mov dword [esp], eax
mov dword [esp + 8], edx
call fcn.00478fa0
lea edi, [esp + 0x80]
lea esi, [esp + 0xc]
call fcn.0045df9e
mov eax, dword [esp + 0xb4]
lea ecx, [esp + 0x80]
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.004777d0
lea edi, [esp + 0xb8]
lea esi, [esp + 0x80]
call fcn.0045df9e
add esp, 0x94
ret
mov eax, ebx
mov ecx, 0xd
call fcn.0045d960
lea eax, [0x4a7ce0]
mov dword [esp], eax
lea eax, [0x4bdb48]
mov dword [esp + 4], eax
call fcn.004342e0
nop
call fcn.0045c4a0
jmp fcn.004791e0