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

Disassembly:
sub esp, 8
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x1c]
mov esi, ecx
mov ax, word [edi + 0xc]
cmp ax, 0x3e8
movsx ecx, ax
jge 0x47c884
mov eax, 0x3e8
cdq
idiv ecx
jmp 0x47c897
mov eax, 0xef9db22d
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, edx
cmp eax, 0xfffffffe
mov dword [esi + 0x26c], eax
jge 0x47c8ac
mov dword [esi + 0x26c], 0xfffffffe
mov ecx, dword [esi + 0x26c]
mov eax, dword [esi + 0xe]
xor ebx, ebx
cmp ecx, ebx
jge 0x47c8c2
cdq
idiv ecx
neg eax
jmp 0x47c8c5
imul eax, ecx
mov cx, word [edi + 0xc]
push ecx
push eax
call fcn.004021e0
mov ebp, eax
mov eax, dword [esi + 8]
add esp, 8
mov dword [esi + 0x78], ebx
cmp eax, ebx
mov eax, dword [edi + 0x260]
lea edx, [eax + eax]
mov dword [esi + 0x264], edx
mov eax, dword [0x658fa8]
imul eax, dword [edi + 0x260]
lea eax, [eax + eax*2]
mov dword [esi + 0x268], eax
push eax
mov eax, dword [esi + 0x2a]
push eax
call fcn.00412550
add esp, 8
cmp ebp, eax
jge 0x47c958
mov ecx, dword [esi + 0x268]
mov edx, dword [esi + 0x2a]
push ecx
push edx
call fcn.00412550
cdq
idiv ebp
add esp, 8
mov ecx, dword [esi + 0x78]
inc eax
mov dword [esi + 0x25c], eax
imul eax, ebp
mov dword [esi + ecx*4 + 0x7c], eax
mov ecx, dword [esi + 0x12]
imul ecx, dword [esi + 0x25c]
mov edx, dword [esi + 0x78]
mov eax, dword [esi + edx*4 + 0x7c]
mov dword [esi + 0x25c], ecx
mov dword [esi + 0x260], eax
jmp 0x47c96e
mov edx, dword [esi + 0x78]
mov dword [esi + edx*4 + 0x7c], ebp
mov eax, dword [esi + 0x12]
mov dword [esi + 0x260], ebp
mov dword [esi + 0x25c], eax
mov ecx, dword [esi + 0x78]
mov eax, 1
mov dword [esp + 0x10], eax
mov dword [esi + ecx*4 + 0x16c], ebx
mov edx, dword [esi + 0x78]
mov ecx, dword [esi + 0x20]
inc edx
cmp ecx, eax
mov dword [esi + 0x78], edx
mov edi, edx
jle 0x47ca1e
lea ebx, [esi + 0x3c]
mov eax, ebp
cdq
idiv dword [ebx]
mov ebp, eax
mov eax, dword [ebx - 4]
cmp ebp, eax
jl 0x47ca1e
lea eax, [edi - 1]
test eax, eax
jl 0x47ca07
lea edx, [esi + eax*4 + 0x7c]
inc eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x14], eax
mov ecx, dword [ebx]
mov eax, 1
cmp ecx, eax
jle 0x47c9f1
mov ecx, ebp
mov edx, dword [esp + 0x1c]
mov edx, dword [edx]
sub edx, ecx
add ecx, ebp
mov dword [esi + edi*4 + 0x7c], edx
mov edx, dword [esi + 0x78]
mov edi, dword [esp + 0x10]
mov dword [esi + edx*4 + 0x16c], edi
mov edi, dword [esi + 0x78]
inc edi
inc eax
mov dword [esi + 0x78], edi
mov edx, dword [ebx]
cmp eax, edx
jl 0x47c9c7
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
sub ecx, 4
dec eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], eax
jne 0x47c9ba
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 0x20]
inc eax
add ebx, 0xe
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x47c998
mov eax, dword [esi + 0x78]
test eax, eax
jle 0x47ca73
mov ebp, 1
lea ecx, [esi + 0x7c]
cmp ebp, eax
mov ebx, ebp
jge 0x47ca65
lea eax, [ecx + 4]
mov edx, dword [eax]
mov edi, dword [ecx]
cmp edx, edi
jge 0x47ca5a
mov dword [eax], edi
mov dword [ecx], edx
mov edi, dword [ecx + 0xf0]
mov edx, dword [eax + 0xf0]
mov dword [eax + 0xf0], edi
mov dword [ecx + 0xf0], edx
mov edx, dword [esi + 0x78]
inc ebx
add eax, 4
cmp ebx, edx
jl 0x47ca36
mov eax, dword [esi + 0x78]
inc ebp
add ecx, 4
lea edx, [ebp - 1]
cmp edx, eax
jl 0x47ca2d
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 4