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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ccc50
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x510a50]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov esi, edx
xor ecx, ecx
mov dword [ebp - 4], ecx
mov eax, dword [edi + 0xc]
mov dword [esi + 0xd], eax
mov edx, dword [edi + 0x18]
mov dword [esi + 0x1d], edx
mov eax, dword [edi + 0x10]
mov dword [esi + 0x15], eax
mov dword [esi + 0x11], ecx
mov edx, dword [edi + 0x14]
mov dword [esi + 0x19], edx
mov eax, dword [edi + 8]
mov dword [esi + 9], eax
mov dword [esi + 0x55], 0x10001
mov dword [esi + 0x59], 0x10001
mov eax, 0x10624dd3
mul dword [edi + 0x10]
mov eax, dword [edi + 0xc]
shr edx, 6
add edx, dword [edi + 8]
add edx, dword [edi + 0x14]
add eax, edx
mov dword [esi + 0x39], eax
add eax, dword [edi + 0x18]
mov dword [esi + 0x35], ecx
mov edx, eax
mov dword [esi + 5], eax
mov dword [esi + 0x21], eax
mov dword [esi + 0x2d], eax
mov dword [esi + 1], edx
mov eax, dword [edi + 0x24]
mov dword [esi + 0x4d], eax
mov edx, dword [edi + 0x20]
mov dword [esi + 0x3d], edx
fild dword [edi + 0x1c]
mov eax, dword [edi + 0x1c]
test eax, eax
jns 0x40d75c
fadd qword [0x4f8998]
fild dword [esi + 5]
fnstcw word [ebp - 0x2e]
fdiv qword [0x4f8990]
movzx eax, word [ebp - 0x2e]
or eax, 0xc00
mov dword [ebp - 0x34], eax
fdivp st(1)
fldcw word [ebp - 0x34]
fistp qword [ebp - 0x38]
mov edx, dword [ebp - 0x38]
mov dword [esi + 0x49], edx
mov eax, dword [edi + 0x1c]
fldcw word [ebp - 0x2e]
mov dword [esi + 0x51], eax
mov edx, dword [edi + 0x1c]
mov eax, dword [esi + 0x49]
mov dword [esi + 0x41], edx
mov dword [esi + 0x45], eax
cmp dword [0x5145f4], 8
mov eax, dword [0x5145e0]
jae 0x40d7aa
mov eax, 0x5145e0
mov edx, dword [0x5145f0]
push edx
push eax
mov eax, dword [ebp + 0x18]
push eax
push ecx
lea ecx, [ebp + 8]
call fcn.0040a540
test eax, eax
je 0x40d7ea
mov cx, word [edi + 0x3c]
mov word [esi + 0x6f], cx
mov edx, dword [edi + 0x3c]
push edx
call fcn.00460bbb
mov dword [esi + 0x71], eax
mov ecx, dword [edi + 0x40]
add esp, 4
mov edx, eax
nop
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x40d7e0
mov eax, 1
push 0x9a
mov word [esi + 0x81], ax
call fcn.00460b81
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40d81d
push 0x9a
push 0
push ebx
call fcn.00488a00
add esp, 0xc
mov eax, ebx
jmp 0x40d81f
xor eax, eax
mov dword [esi + 0x83], eax
xor ecx, ecx
mov dword [eax + 0x24], ecx
mov edx, dword [esi + 0x83]
mov eax, dword [ebp + 0x24]
mov dword [edx + 4], eax
mov edx, dword [esi + 0x83]
mov eax, dword [edi + 0xc]
mov dword [edx + 0xc], eax
mov edx, dword [esi + 0x83]
mov eax, dword [edi + 8]
mov dword [edx + 8], eax
mov edx, dword [esi + 0x83]
mov eax, dword [edi + 0x18]
mov dword [edx + 0x18], eax
mov edx, dword [esi + 0x83]
mov eax, dword [edi + 0x10]
mov dword [edx + 0x14], eax
mov edx, dword [esi + 0x83]
mov dword [edx + 0x10], ecx
mov eax, dword [esi + 0x83]
mov ecx, dword [edi + 0x24]
mov dword [eax + 0x28], ecx
mov edx, dword [esi + 0x83]
mov eax, dword [esi + 0x39]
mov dword [edx], eax
mov ecx, dword [esi + 0x83]
mov edx, dword [edi + 0x14]
mov dword [ecx + 0x1c], edx
mov eax, dword [esi + 0x83]
mov ecx, dword [edi + 0x24]
mov dword [eax + 0x28], ecx
mov edx, dword [esi + 0x83]
mov eax, dword [edi + 0x1c]
mov dword [edx + 0x2c], eax
mov ecx, dword [esi + 0x83]
mov dx, word [edi + 0x2c]
mov word [ecx + 0x88], dx
movzx eax, word [edi + 0x2c]
push eax
call fcn.00460bbb
mov ecx, dword [esi + 0x83]
mov dword [ecx + 0x8a], eax
mov edx, dword [edi + 0x30]
movzx eax, word [edi + 0x2c]
mov ecx, dword [esi + 0x83]
push edx
mov edx, dword [ecx + 0x8a]
push eax
push edx
call fcn.00485f56
mov eax, dword [esi + 0x83]
mov edx, dword [edi + 0x30]
sub esp, 0xc
mov dword [ebp - 0x30], eax
mov ecx, esp
mov eax, edx
lea ebx, [eax + 1]
mov dword [ebp - 0x34], esp
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
mov byte [ecx], 0
mov dword [ebp - 0x34], ebx
lea esp, [esp]
mov bl, byte [eax]
inc eax
test bl, bl
jne 0x40d920
sub eax, dword [ebp - 0x34]
push eax
push edx
call fcn.00404e60
lea ebx, [ebp - 0x2c]
call fcn.0040d0c0
add esp, 0x1c
mov ebx, eax
mov byte [ebp - 4], 1
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x40d97f
mov ecx, dword [ebp - 0x30]
inc eax
movzx edx, ax
push edx
mov word [ecx + 0x82], ax
call fcn.00460bbb
mov ecx, dword [ebp - 0x30]
add esp, 4
mov dword [ecx + 0x84], eax
cmp dword [ebx + 0x14], 0x10
jb 0x40d971
mov ebx, dword [ebx]
mov ecx, eax
mov al, byte [ebx]
mov byte [ecx], al
inc ebx
inc ecx
test al, al
jne 0x40d973
jmp 0x40d995
mov eax, dword [ebp - 0x30]
xor edx, edx
mov dword [eax + 0x84], 0
mov word [eax + 0x82], dx
mov byte [ebp - 4], 0
cmp dword [ebp - 0x18], 0x10
jb 0x40d9ab
mov eax, dword [ebp - 0x2c]
push eax
call fcn.00460bb0
add esp, 4
mov ecx, dword [esi + 0x83]
lea ebx, [edi + 0x44]
push ebx
add ecx, 0x78
push 8
push ecx
call fcn.00485f56
mov edx, dword [edi + 0x38]
mov eax, dword [esi + 0x83]
push edx
add eax, 0x30
push 0x40
push eax
call fcn.00485f56
mov eax, dword [0x514618]
add esp, 0x18
cmp dword [0x51462c], 8
jae 0x40d9eb
mov eax, 0x514618
mov ecx, dword [0x514628]
mov edx, dword [ebp + 0x18]
push ecx
push eax
push edx
push 0
lea ecx, [ebp + 8]
call fcn.0040a540
test eax, eax
jne 0x40da4a
mov eax, dword [esi + 0x83]
mov cx, word [edi + 0x3c]
mov word [eax + 0x94], cx
mov edx, dword [edi + 0x3c]
push edx
call fcn.00460bbb
mov ecx, dword [esi + 0x83]
mov dword [ecx + 0x96], eax
mov edx, dword [esi + 0x83]
mov edi, dword [edi + 0x40]
mov ecx, dword [edx + 0x96]
add esp, 4
lea ecx, [ecx]
mov al, byte [edi]
mov byte [ecx], al
inc edi
inc ecx
test al, al
jne 0x40da40
push ebx
push 8
add esi, 0x25
push esi
call fcn.00485f56
add esp, 0xc
cmp dword [ebp + 0x1c], 8
jb 0x40da6b
mov eax, dword [ebp + 8]
push eax
call fcn.00460bb0
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004840ae
mov esp, ebp
pop ebp
ret