Function at 0x408700
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x458fcf
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
push ebx
push esi
mov esi, ecx
push edi
mov dword [esp + 0x14], esi
call fcn.00406990
mov eax, dword [ebp + 8]
xor ebx, ebx
push 0x45d66d
lea ecx, [esi + 0x4c]
mov dword [esp + 0x30], ebx
mov dword [esi], 0x45dd4c
mov dword [esi + 0x48], eax
call fcn.00402330
mov dword [esi + 0x50], ebx
mov byte [esi + 0xc], 1
mov byte [esi + 0x1c], 1
mov ecx, dword [0x47c158]
mov edx, dword [ecx + 0x7f4]
mov eax, dword [edx + 0x20]
mov byte [esp + 0x2c], 1
mov dword [esi + 0x20], eax
lea ecx, [ecx]
mov al, bl
add al, 0x61
push 0xc0
mov byte [esp + 0x10], al
call fcn.0044b938
mov edi, eax
add esp, 4
mov dword [esp + 0x18], edi
test edi, edi
mov byte [esp + 0x2c], 2
je 0x408803
push ecx
mov ecx, esp
mov dword [esp + 0x14], esp
push 0x45d66d
call fcn.00402330
mov edx, dword [esp + 0x10]
push ecx
mov ecx, esp
mov dword [esp + 0x24], esp
push 1
push edx
mov byte [esp + 0x3c], 3
call fcn.004085c0
mov eax, ebx
cdq
mov ecx, 6
idiv ecx
sub esp, 0x10
mov ecx, edi
mov byte [esp + 0x44], 2
imul eax, eax, 0x32
add eax, 0xb4
lea edx, [edx + edx*4]
mov dword [esp + 0x28], eax
shl edx, 4
fild dword [esp + 0x28]
add edx, 0x78
mov dword [esp + 0x28], edx
fstp qword [esp + 8]
fild dword [esp + 0x28]
fstp qword [esp]
push esi
call fcn.00422190
mov edi, eax
jmp 0x408805
xor edi, edi
push edi
lea ecx, [esi + 0x10]
mov byte [esp + 0x30], 1
call fcn.00401210
mov al, byte [esp + 0xc]
inc ebx
cmp ebx, 0x1a
mov byte [edi + 0xb8], al
jl 0x408770
push 0xc0
call fcn.0044b938
mov edi, eax
add esp, 4
mov dword [esp + 0x1c], edi
test edi, edi
mov bl, 4
mov byte [esp + 0x2c], bl
je 0x408889
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push 0x45d66d
call fcn.00402330
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push 0x45dd68
mov byte [esp + 0x38], 5
call fcn.00402330
push 0x4077c000
push 0
push 0x40718000
push 0
push esi
mov ecx, edi
mov byte [esp + 0x48], bl
call fcn.00422190
mov edi, eax
jmp 0x40888b
xor edi, edi
lea ebx, [esi + 0x10]
push edi
mov ecx, ebx
mov byte [esp + 0x30], 1
call fcn.00401210
push 0xc0
mov byte [edi + 0xb8], 0x20
call fcn.0044b938
mov edi, eax
add esp, 4
mov dword [esp + 0x1c], edi
test edi, edi
mov byte [esp + 0x2c], 6
je 0x408904
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push 0x45d66d
call fcn.00402330
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push 0x45dd64
mov byte [esp + 0x38], 7
call fcn.00402330
push 0x4077c000
push 0
push 0x407b8000
push 0
push esi
mov ecx, edi
mov byte [esp + 0x48], 6
call fcn.00422190
mov edi, eax
jmp 0x408906
xor edi, edi
push edi
mov ecx, ebx
mov byte [esp + 0x30], 1
call fcn.00401210
push 0xc0
mov byte [edi + 0xb8], 8
call fcn.0044b938
mov edi, eax
add esp, 4
mov dword [esp + 0x1c], edi
test edi, edi
mov byte [esp + 0x2c], 8
je 0x40897c
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push 0x45d66d
call fcn.00402330
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push 0x45dd60
mov byte [esp + 0x38], 9
call fcn.00402330
push 0x4077c000
push 0
push 0x40804000
push 0
push esi
mov ecx, edi
mov byte [esp + 0x48], 8
call fcn.00422190
mov edi, eax
jmp 0x40897e
xor edi, edi
push edi
mov ecx, ebx
mov byte [esp + 0x30], 1
call fcn.00401210
mov byte [edi + 0xb8], 0xd
mov dword [esi + 0x50], 0
mov ebx, 0xa
mov edi, edi
mov edx, dword [0x47c158]
mov ecx, dword [esi + 0x48]
mov eax, dword [edx + 0x834]
mov ecx, dword [eax + ecx*4 + 0x68]
mov edi, dword [esi + 0x50]
add ecx, 0x138
call fcn.00429b10
mov edx, dword [0x47c158]
mov ecx, edi
imul ecx, ecx, 0xa4
cmp eax, dword [ecx + edx + 0x88]
jg 0x4089e2
inc edi
mov eax, edi
cmp eax, ebx
mov dword [esi + 0x50], edi
jl 0x4089a0
mov eax, dword [esi + 0x50]
test eax, eax
jge 0x4089f0
mov dword [esi + 0x50], 0
mov ecx, dword [esi + 0x50]
mov eax, 9
cmp ecx, eax
jle 0x4089ff
mov dword [esi + 0x50], eax
mov ecx, dword [esp + 0x24]
pop edi
mov eax, esi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4