Function at 0x40d550
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x7258b6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x78
push ebx
push esi
push edi
mov edi, ecx
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x18], edi
mov ax, word [ecx]
cmp ax, 0x20
jg 0x40d585
xor esi, esi
xor ebx, ebx
jmp 0x40d5ac
cmp ax, 0x40
jg 0x40d594
mov dword [ebp - 0x10], 4
jmp 0x40d5a7
xor edx, edx
cmp ax, 0x80
setg dl
dec edx
and edx, 0xfffffffc
add edx, 0xc
mov dword [ebp - 0x10], edx
mov ebx, dword [ebp - 0x10]
xor esi, esi
mov ax, word [ecx + 2]
cmp ax, 0x20
jg 0x40d5ba
xor eax, eax
jmp 0x40d5d5
cmp ax, 0x40
jg 0x40d5c7
mov eax, 1
jmp 0x40d5d5
xor ecx, ecx
cmp ax, 0x80
setg cl
add ecx, 2
mov eax, ecx
add ebx, eax
mov dword [ebp - 0x10], ebx
call dword [sym.imp.WINMM.dll_timeGetTime]
mov edx, dword [0x7719b8]
lea ecx, [ebx + ebx*2 + 0x63]
shr edx, 2
sub eax, edx
lea edx, [edi + ecx*4]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x14], edx
jmp 0x40d602
mov eax, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x10]
xor esi, esi
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx]
mov edi, dword [edx]
cmp edi, edx
je 0x40d62f
mov esi, dword [edi + 0x20]
mov ecx, dword [edi + 0x24]
cmp esi, ecx
je 0x40d627
cmp dword [esi + 8], eax
jb 0x40d897
add esi, 0x24
cmp esi, ecx
jne 0x40d617
mov edi, dword [edi]
cmp edi, edx
jne 0x40d60d
xor esi, esi
mov dl, byte [ebp + 0xb]
mov dword [ebp - 0x6c], esi
mov byte [ebp - 0x70], dl
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x64], esi
mov ecx, dword [ebp - 0x18]
lea eax, [ebx + ebx*2]
lea edx, [ebp - 0x84]
mov dword [ebp - 4], esi
lea ecx, [ecx + eax*4 + 0x188]
push edx
mov eax, dword [ecx + 4]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00414050
mov ecx, dword [ebp - 0x68]
mov edx, dword [ebp - 0x6c]
push ecx
push edx
lea ecx, [ebp - 0x70]
mov dword [ebp - 4], 0xffffffff
call fcn.00413e00
mov eax, dword [ebp - 0x6c]
push eax
call fcn.00703996
mov ecx, dword [ebp - 0x14]
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0x6c], esi
mov dword [ebp - 0x68], esi
mov eax, dword [ecx]
mov dword [ebp - 0x64], esi
add esp, 4
mov esi, dword [eax + 4]
mov eax, dword [edi + 0x250]
test eax, eax
jne 0x40d6eb
push 0x128
call fcn.00711d5b
add esp, 4
mov dword [ebp - 0x24], eax
test eax, eax
mov dword [ebp - 4], 2
je 0x40d6dd
push 0
push 0x100
push 0x100
mov ecx, eax
call fcn.00416f00
mov dword [ebp - 4], 0xffffffff
mov dword [esi + 8], eax
jmp 0x40d728
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov dword [esi + 8], eax
jmp 0x40d728
mov eax, dword [edi + 0x24c]
mov edx, dword [eax + 4]
mov eax, dword [edx + 8]
mov dword [esi + 8], eax
mov ecx, dword [edi + 0x24c]
mov eax, dword [ecx + 4]
push eax
mov edx, dword [eax + 4]
mov ecx, dword [eax]
mov dword [edx], ecx
mov edx, dword [eax]
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
call fcn.00703996
mov eax, dword [edi + 0x250]
add esp, 4
dec eax
mov dword [edi + 0x250], eax
mov ecx, dword [esi + 8]
push 0
push 0
mov edx, dword [ecx]
call dword [edx + 8]
mov eax, dword [ebx*8 + 0x769990]
lea edi, [ebp - 0x58]
mov dword [esi + 0x14], eax
mov eax, 0x100
cdq
idiv dword [esi + 0x14]
mov ecx, dword [ebx*8 + 0x769994]
mov dword [esi + 0x18], ecx
mov ebx, eax
mov eax, 0x100
cdq
idiv ecx
mov ecx, 9
mov dword [esi + 0xc], ebx
mov edx, eax
xor eax, eax
mov dword [esi + 0x10], edx
imul edx, ebx
rep stosd dword es:[edi], eax
mov ecx, dword [esi + 0x20]
lea edi, [esi + 0x1c]
test ecx, ecx
mov ebx, edx
jne 0x40d782
xor edx, edx
jmp 0x40d798
mov edx, dword [edi + 8]
mov eax, 0x38e38e39
sub edx, ecx
imul edx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp edx, ebx
jae 0x40d7ce
test ecx, ecx
jne 0x40d7a4
xor edx, edx
jmp 0x40d7ba
mov edx, dword [edi + 8]
mov eax, 0x38e38e39
sub edx, ecx
imul edx
sar edx, 3
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
mov ecx, dword [edi + 8]
lea eax, [ebp - 0x58]
sub ebx, edx
push eax
push ebx
push ecx
mov ecx, edi
call fcn.00413b10
jmp 0x40d811
test ecx, ecx
je 0x40d811
mov edx, dword [edi + 8]
mov eax, 0x38e38e39
sub edx, ecx
imul edx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp ebx, edx
jae 0x40d811
mov eax, dword [edi + 8]
lea edx, [ebx + ebx*8]
lea ecx, [ecx + edx*4]
push ecx
push eax
push eax
call fcn.004153e0
add esp, 0xc
mov ebx, eax
mov eax, dword [edi + 8]
mov ecx, edi
push eax
push ebx
call fcn.00413e00
mov dword [edi + 8], ebx
mov eax, dword [esi + 0x10]
xor edi, edi
test eax, eax
jle 0x40d5fa
mov eax, dword [esi + 0xc]
xor ecx, ecx
test eax, eax
jle 0x40d88a
mov edx, dword [esi + 0x14]
imul eax, edi
imul edx, ecx
mov ebx, dword [esi + 0x20]
add eax, ecx
lea eax, [eax + eax*8]
shl eax, 2
mov dword [eax + ebx + 0x1c], edx
mov edx, dword [esi + 0x18]
imul edx, edi
mov ebx, dword [esi + 0x20]
mov dword [eax + ebx + 0x20], edx
mov edx, dword [esi + 0x20]
add edx, eax
mov ebx, dword [edx + 0x1c]
mov dword [ebp - 0x2c], ebx
xor ebx, ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x30], ebx
fild qword [ebp - 0x2c]
fmul dword [0x73a6a0]
fstp dword [edx + 0xc]
mov edx, dword [esi + 0x20]
add eax, edx
inc ecx
mov edx, dword [eax + 0x20]
mov dword [ebp - 0x34], edx
fild qword [ebp - 0x34]
fmul dword [0x73a6a0]
fstp dword [eax + 0x10]
mov eax, dword [esi + 0xc]
cmp ecx, eax
jl 0x40d827
mov eax, dword [esi + 0x10]
inc edi
cmp edi, eax
jl 0x40d81e
jmp 0x40d5fa
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov dword [esi], eax
mov dword [esi + 4], ebx
cmp dword [0x81424c], 0xa
je 0x40d8da
movsx ecx, word [eax]
add ecx, dword [esi + 0x1c]
mov dword [ebp - 0x34], ecx
xor ecx, ecx
mov dword [ebp - 0x30], ecx
fild qword [ebp - 0x34]
mov dword [ebp - 0x30], ecx
fmul dword [0x73a6a0]
fstp dword [esi + 0x14]
movsx edx, word [eax + 2]
add edx, dword [esi + 0x20]
mov dword [ebp - 0x34], edx
fild qword [ebp - 0x34]
jmp 0x40d95a
mov cx, word [eax]
cmp cx, 0x40
jle 0x40d907
mov edx, dword [esi + 0x1c]
movsx ecx, cx
add ecx, edx
xor edx, edx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x30], edx
fild qword [ebp - 0x34]
fmul dword [0x73a6a0]
fsub dword [0x73a6ec]
fstp dword [esi + 0x14]
jmp 0x40d927
movsx edx, cx
mov ecx, dword [esi + 0x1c]
mov dword [ebp - 0x30], 0
add edx, ecx
mov dword [ebp - 0x34], edx
xor edx, edx
fild qword [ebp - 0x34]
fmul dword [0x73a6a0]
fstp dword [esi + 0x14]
mov cx, word [eax + 2]
cmp cx, 0x40
movsx ecx, cx
jle 0x40d94e
add ecx, dword [esi + 0x20]
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x34], ecx
fild qword [ebp - 0x34]
fmul dword [0x73a6a0]
fsub dword [0x73a6ec]
jmp 0x40d960
add ecx, dword [esi + 0x20]
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x34], ecx
fild qword [ebp - 0x34]
fmul dword [0x73a6a0]
fstp dword [esi + 0x18]
mov edx, dword [edi + 0x18]
mov ecx, dword [esi + 0x20]
push ebx
push eax
mov eax, dword [edi + 0x14]
push edx
mov edx, dword [esi + 0x1c]
push eax
push ecx
mov ecx, dword [edi + 8]
push edx
call fcn.00417680
call dword [sym.imp.WINMM.dll_timeGetTime]
mov dword [esi + 8], eax
mov dword [edi + 0x30], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [esi + 0xc]
mov dword [eax + 0xc], ecx
mov edx, dword [esi + 0x10]
mov dword [eax + 0x10], edx
mov ecx, dword [esi + 0x14]
mov dword [eax + 0x14], ecx
mov edx, dword [esi + 0x18]
mov ecx, dword [ebp - 0xc]
mov dword [eax + 0x18], edx
mov eax, dword [edi + 8]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0xc