Function at 0x479780
Capabilities:
Access peb ldr_data
Check for peb ntglobalflag flag
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4a6588
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x74
mov eax, dword [ebp + 8]
push ebx
push esi
add eax, 0x5c
push edi
push eax
lea ecx, [esp + 0x68]
call fcn.00426120
mov eax, 0x7fff
xor edx, edx
mov word [esp + 0x28], ax
mov word [esp + 0x2a], ax
mov eax, 0xffff8001
mov dword [esp + 0x48], edx
mov word [esp + 0x2c], ax
mov word [esp + 0x2e], ax
fld dword [ebp + 0xc]
fmul dword [ebp + 0xc]
mov ebx, dword [ebp + 0x14]
mov esi, dword [ebp + 0x10]
sub ebx, esi
mov dword [esp + 0x88], edx
fadd dword [0x4a8248]
inc ebx
cmp ebx, edx
mov dword [esp + 0xc], ebx
fsqrt
fld dword [0x4a8248]
fdiv st(1)
fstp dword [esp + 0x30]
fld dword [ebp + 0xc]
fdiv st(1)
fchs
fstp dword [esp + 0x34]
fstp st(0)
jle 0x47981d
mov edi, dword [ebp + 0x1c]
mov ecx, ebx
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x6c]
cmp eax, edx
je 0x47982b
mov dword [esp + 0x78], eax
jmp 0x479830
mov byte [esp + 0x75], 1
mov byte [esp + 0x7c], 0
mov ecx, dword [esp + 0x64]
cmp dword [ecx], 0
je 0x479b28
cmp eax, dword [esp + 0x78]
jne 0x479854
mov cl, byte [esp + 0x7c]
test cl, cl
jne 0x479b28
lea edx, [eax + 0x70]
mov dword [esp + 0x48], edx
mov eax, dword [edx]
mov dword [esp + 0x4c], eax
mov eax, dword [edx]
test eax, eax
je 0x47986b
mov eax, dword [eax]
jmp 0x47986d
xor eax, eax
test eax, eax
mov dword [esp + 0x50], eax
je 0x479879
mov ecx, dword [eax]
jmp 0x47987b
xor ecx, ecx
test eax, eax
mov dword [esp + 0x54], ecx
mov dword [esp + 0x5c], 0
mov byte [esp + 0x58], 0
mov byte [esp + 0x59], 0
je 0x47989b
mov dword [esp + 0x5c], eax
jmp 0x4798a0
mov byte [esp + 0x59], 1
mov byte [esp + 0x60], 0
cmp dword [edx], 0
je 0x479b16
cmp eax, dword [esp + 0x5c]
jne 0x4798c0
mov cl, byte [esp + 0x60]
test cl, cl
jne 0x479b16
mov ecx, dword [eax + 8]
sub esp, 8
mov dword [esp + 0x30], ecx
mov edx, dword [eax + 0xc]
mov eax, dword [esp + 0x38]
mov dword [esp + 0x34], edx
movsx edx, word [esp + 0x30]
mov dword [esp + 0x18], edx
mov dword [esp + 0x40], eax
fild dword [esp + 0x18]
movsx eax, word [esp + 0x32]
fmul dword [esp + 0x38]
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x3c]
fild dword [esp + 0x18]
mov dword [esp + 0x44], ecx
fmul dword [esp + 0x3c]
fsubp st(1)
fadd qword [0x4a8220]
fstp qword [esp]
call dword [sym.imp.MSVCRT.dll_floor]
call sub.MSVCRT.dll__ftol
movsx ecx, word [esp + 0x32]
movsx edx, word [esp + 0x30]
mov dword [esp + 0x18], ecx
mov edi, eax
fild dword [esp + 0x18]
mov dword [esp + 0x18], edx
fmul dword [esp + 0x40]
fild dword [esp + 0x18]
fmul dword [esp + 0x44]
faddp st(1)
fadd qword [0x4a8220]
fstp qword [esp]
call dword [sym.imp.MSVCRT.dll_floor]
add esp, 8
call sub.MSVCRT.dll__ftol
mov word [esp + 0x2a], ax
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x30]
mov word [esp + 0x2c], di
call fcn.004796e0
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
push ecx
push edx
lea ecx, [esp + 0x48]
call fcn.004383d0
mov ecx, dword [eax]
mov dword [esp + 0x28], ecx
mov edx, dword [eax + 4]
lea ecx, [esp + 0x40]
mov dword [esp + 0x2c], edx
call fcn.004331c0
movsx eax, word [esp + 0x2e]
movsx ecx, word [esp + 0x2a]
movsx edx, word [esp + 0x2c]
mov dword [esp + 0x10], eax
sub esp, 8
fild dword [esp + 0x18]
movsx eax, word [esp + 0x30]
fstp dword [esp + 0x24]
mov dword [esp + 0x18], ecx
sub edx, eax
fild dword [esp + 0x18]
mov dword [esp + 0x18], edx
fstp dword [esp + 0x1c]
fild dword [esp + 0x18]
fstp qword [esp]
call dword [sym.imp.MSVCRT.dll_floor]
call sub.MSVCRT.dll__ftol
fld dword [esp + 0x1c]
mov dword [esp + 0x18], eax
fstp qword [esp + 0x1c]
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x1c]
push edi
push ebx
call dword [sym.imp.MSVCRT.dll_floor]
add esp, 0x10
call sub.MSVCRT.dll__ftol
cmp eax, esi
jl 0x479a20
push edi
push ebx
call dword [sym.imp.MSVCRT.dll_floor]
add esp, 8
call sub.MSVCRT.dll__ftol
mov ecx, dword [esp + 0xc]
sub eax, esi
cmp eax, ecx
jl 0x479a4e
mov ecx, dword [ebp + 0x14]
push ecx
push esi
push edi
push ebx
call dword [sym.imp.MSVCRT.dll_floor]
add esp, 8
call sub.MSVCRT.dll__ftol
mov edx, dword [sym.imp.MSVCRT.dll__iob]
push eax
add edx, 0x40
push 0x4c5310
push edx
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0x14
push edi
push ebx
call dword [sym.imp.MSVCRT.dll_floor]
call sub.MSVCRT.dll__ftol
mov ecx, dword [ebp + 0x1c]
mov edx, dword [esp + 0x18]
fld dword [esp + 0x24]
sub eax, esi
fstp qword [esp + 0x24]
mov edi, dword [ecx + eax*4]
lea eax, [ecx + eax*4]
mov ebx, dword [esp + 0x24]
add edi, edx
mov dword [eax], edi
mov edi, dword [esp + 0x28]
push edi
push ebx
call dword [sym.imp.MSVCRT.dll_floor]
add esp, 0x10
call sub.MSVCRT.dll__ftol
cmp eax, esi
jl 0x479aac
push edi
push ebx
call dword [sym.imp.MSVCRT.dll_floor]
add esp, 8
call sub.MSVCRT.dll__ftol
mov ecx, dword [esp + 0xc]
sub eax, esi
cmp eax, ecx
jl 0x479ada
mov eax, dword [ebp + 0x14]
push eax
push esi
push edi
push ebx
call dword [sym.imp.MSVCRT.dll_floor]
add esp, 8
call sub.MSVCRT.dll__ftol
mov ecx, dword [sym.imp.MSVCRT.dll__iob]
push eax
add ecx, 0x40
push 0x4c52f0
push ecx
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0x14
push edi
push ebx
call dword [sym.imp.MSVCRT.dll_floor]
add esp, 8
call sub.MSVCRT.dll__ftol
mov edx, dword [ebp + 0x1c]
mov ecx, dword [esp + 0x10]
sub eax, esi
lea eax, [edx + eax*4]
mov edx, dword [eax]
sub edx, ecx
lea ecx, [esp + 0x48]
mov dword [eax], edx
call fcn.004403e0
mov eax, dword [esp + 0x50]
mov edx, dword [esp + 0x48]
mov ebx, dword [esp + 0xc]
jmp 0x4798a5
lea ecx, [esp + 0x64]
call fcn.00440e40
mov eax, dword [esp + 0x6c]
jmp 0x479835
mov edx, dword [ebp + 0x1c]
cmp ebx, 1
mov eax, dword [edx]
mov edx, dword [ebp + 0x18]
mov dword [edx], eax
jle 0x479b52
mov ecx, dword [ebp + 0x1c]
lea eax, [edx + 4]
sub ecx, edx
lea edx, [ebx - 1]
mov esi, dword [ecx + eax]
mov ebx, dword [eax - 4]
add esi, ebx
mov dword [eax], esi
add eax, 4
dec edx
jne 0x479b42
mov ecx, dword [esp + 0x80]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret