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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x45922f
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], 0x45dd0c
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.0044bba8
mov edi, eax
add esp, 4
mov dword [esp + 0x18], edi
test edi, edi
mov byte [esp + 0x2c], 2
je 0x408703
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.004084c0
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.004221c0
mov edi, eax
jmp 0x408705
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 0x408670
push 0xc0
call fcn.0044bba8
mov edi, eax
add esp, 4
mov dword [esp + 0x1c], edi
test edi, edi
mov bl, 4
mov byte [esp + 0x2c], bl
je 0x408789
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 0x45dd28
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.004221c0
mov edi, eax
jmp 0x40878b
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.0044bba8
mov edi, eax
add esp, 4
mov dword [esp + 0x1c], edi
test edi, edi
mov byte [esp + 0x2c], 6
je 0x408804
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 0x45dd24
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.004221c0
mov edi, eax
jmp 0x408806
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.0044bba8
mov edi, eax
add esp, 4
mov dword [esp + 0x1c], edi
test edi, edi
mov byte [esp + 0x2c], 8
je 0x40887c
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 0x45dd20
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.004221c0
mov edi, eax
jmp 0x40887e
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.00429b50
mov edx, dword [0x47c158]
mov ecx, edi
imul ecx, ecx, 0xa4
cmp eax, dword [ecx + edx + 0x88]
jg 0x4088e2
inc edi
mov eax, edi
cmp eax, ebx
mov dword [esi + 0x50], edi
jl 0x4088a0
mov eax, dword [esi + 0x50]
test eax, eax
jge 0x4088f0
mov dword [esi + 0x50], 0
mov ecx, dword [esi + 0x50]
mov eax, 9
cmp ecx, eax
jle 0x4088ff
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