Function at 0x65f980
Capabilities:
Access peb ldr_data
Get file size
Get ntdll base address

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x7ba608
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x831184]
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 eax, dword [ebp + 8]
lea ecx, [edi + 0x3c]
push 0
push 0x7cf388
mov dword [ebp - 0x14], eax
call fcn.004044f0
mov dword [edi + 8], 0
lea ebx, [edi + 0x30]
mov byte [edi + 0xc], 0
mov eax, dword [edi + 0x18]
mov dword [edi + 0x1c], eax
mov eax, dword [edi + 0x24]
mov dword [edi + 0x28], eax
mov eax, dword [ebx + 4]
mov esi, dword [ebx]
cmp esi, eax
je 0x65f9fb
mov ebx, eax
mov ecx, esi
call fcn.0040f050
add esi, 0xc
cmp esi, ebx
jne 0x65f9e7
mov esi, dword [edi + 0x30]
lea ebx, [edi + 0x30]
mov eax, dword [ebp - 0x14]
mov dword [ebx + 4], esi
lea esi, [edi + 0x3c]
mov dword [edi], 0
mov dword [edi + 4], 0
cmp esi, eax
je 0x65fa29
cmp dword [eax + 0x14], 8
mov ecx, dword [eax + 0x10]
jb 0x65fa20
mov eax, dword [eax]
push ecx
push eax
mov ecx, esi
call fcn.004044f0
xor eax, eax
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 7
mov word [ebp - 0x68], ax
mov dword [ebp - 4], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
push esi
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 1
call fcn.00403b80
lea eax, [ebp - 0x68]
mov dword [ebp - 4], 2
push eax
call fcn.00418540
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x50]
mov bl, al
call fcn.00404220
lea ecx, [ebp - 0x68]
call fcn.00404490
test bl, bl
jne 0x65fa8d
xor al, al
jmp 0x65fdb6
xorps xmm0, xmm0
movlpd qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], 3
cmp dword [esi + 0x14], 8
jb 0x65fab2
mov esi, dword [esi]
sub esp, 0xc
lea ecx, [ebp - 0x1c]
push 3
push 1
push SysReAllocString
push esi
call fcn.00415b70
test eax, eax
jne 0x65fd9f
mov ebx, dword [ebp - 0x1c]
lea eax, [ebp - 0x28]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x2c], eax
cmp eax, 0xffffffff
jne 0x65faf5
call fcn.00415b30
test eax, eax
js 0x65fda2
mov eax, dword [ebp - 0x2c]
or eax, dword [ebp - 0x28]
je 0x65fda2
push 4
push edi
lea ecx, [ebp - 0x1c]
mov dword [edi], 0
call fcn.0063b480
mov eax, dword [edi]
test eax, eax
je 0x65fd9f
mov dword [edi + 4], 0
lea ecx, [ebp - 0x1c]
cmp eax, 4
jne 0x65fb42
push 5
lea esi, [edi + 8]
push esi
call fcn.0063b480
mov eax, dword [esi]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x65fd9f
jmp 0x65fb66
cmp eax, 5
jne 0x65fd9a
push 8
lea eax, [edi + 0xd]
push eax
call fcn.0063b480
movzx eax, word [edi + 0x11]
test ax, ax
je 0x65fd9f
mov dword [ebp - 0x14], eax
mov dword [edi + 4], eax
lea ebx, [eax + 1]
mov ecx, dword [edi + 0x20]
lea esi, [edi + 0x18]
sub ecx, dword [esi]
mov eax, 0x2aaaaaab
imul ecx
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jbe 0x65fb9f
cmp ebx, 0x2aaaaaaa
ja 0x65fdd4
push ebx
mov ecx, esi
call fcn.006602a0
mov eax, dword [edi + 4]
jmp 0x65fba2
mov eax, dword [ebp - 0x14]
xor ebx, ebx
add eax, 1
je 0x65fbee
nop dword [eax]
push 6
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x1c]
call fcn.0063b480
mov ecx, dword [esi + 4]
cmp dword [esi + 8], ecx
je 0x65fbd9
mov eax, dword [ebp - 0x24]
mov dword [ecx], eax
mov ax, word [ebp - 0x20]
mov word [ecx + 4], ax
add dword [esi + 4], 6
jmp 0x65fbe5
lea eax, [ebp - 0x24]
push eax
push ecx
mov ecx, esi
call fcn.00660510
mov eax, dword [edi + 4]
inc ebx
inc eax
cmp ebx, eax
jb 0x65fbb0
cmp dword [edi], 5
jne 0x65fc5a
mov eax, dword [edi + 0x2c]
sub eax, dword [edi + 0x24]
movzx ecx, word [edi + 0x13]
mov edx, ecx
sar eax, 2
cmp edx, eax
jbe 0x65fc13
push edx
lea ecx, [edi + 0x24]
call fcn.00660200
movzx ecx, word [edi + 0x13]
xor eax, eax
cmp ax, cx
jae 0x65fc5a
xor esi, esi
nop dword [eax]
push 4
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x1c]
call fcn.0063b480
mov ecx, dword [edi + 0x28]
cmp dword [edi + 0x2c], ecx
je 0x65fc41
mov eax, dword [ebp - 0x14]
mov dword [ecx], eax
add dword [edi + 0x28], 4
jmp 0x65fc4e
lea eax, [ebp - 0x14]
push eax
push ecx
lea ecx, [edi + 0x24]
call fcn.006603d0
movzx eax, word [edi + 0x13]
inc esi
cmp esi, eax
jl 0x65fc20
lea esi, [edi + 0x18]
movzx eax, word [edi + 0x13]
add eax, dword [edi + 4]
mov ecx, dword [edi + 0x38]
sub ecx, dword [edi + 0x30]
mov dword [ebp - 0x24], eax
mov eax, 0x2aaaaaab
imul ecx
mov ecx, dword [ebp - 0x24]
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ecx, eax
jbe 0x65fc96
cmp ecx, 0x15555555
ja 0x65fdd9
push ecx
lea ecx, [edi + 0x30]
call fcn.00660160
mov eax, dword [edi + 4]
xor edx, edx
mov ebx, dword [ebp - 0x1c]
mov dword [ebp - 0x24], edx
test eax, eax
je 0x65fd85
xor ecx, ecx
mov dword [ebp - 0x14], ecx
nop
mov eax, dword [esi]
mov esi, dword [eax + ecx + 8]
sub esi, dword [eax + ecx + 2]
js 0x65fd6f
mov eax, esi
cdq
cmp edx, dword [ebp - 0x28]
ja 0x65fd85
jb 0x65fcd7
cmp eax, dword [ebp - 0x2c]
jae 0x65fd85
push ecx
lea eax, [ebp - 0x41]
mov dword [ebp - 0x30], 0
push eax
xorps xmm0, xmm0
mov byte [ebp - 0x41], 0
push esi
lea ecx, [ebp - 0x38]
movq qword [ebp - 0x38], xmm0
call fcn.0041e2a0
mov byte [ebp - 4], 4
mov eax, dword [edi + 0x18]
mov ecx, dword [ebp - 0x14]
push 0
mov dword [ebp - 0x3c], 0
mov eax, dword [eax + ecx + 2]
lea ecx, [ebp - 0x3c]
push ecx
push eax
push ebx
mov dword [ebp - 0x40], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x65fd28
call fcn.00415b30
test esi, esi
jle 0x65fd3b
push esi
push dword [ebp - 0x38]
lea ecx, [ebp - 0x1c]
call fcn.0063b480
mov ebx, dword [ebp - 0x1c]
mov eax, dword [edi + 0x34]
lea ecx, [ebp - 0x38]
push ecx
cmp dword [edi + 0x38], eax
je 0x65fd54
mov ecx, eax
call fcn.004795e0
add dword [edi + 0x34], 0xc
jmp 0x65fd5d
push eax
lea ecx, [edi + 0x30]
call fcn.00656b60
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 3
call fcn.0040f050
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x24]
inc edx
lea esi, [edi + 0x18]
add ecx, 6
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x14], ecx
cmp edx, dword [edi + 4]
jb 0x65fcb0
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x65fd94
push ebx
call esi
xor ebx, ebx
mov byte [ebp - 0x41], 1
jmp 0x65fdac
call fcn.00415b50
mov ebx, dword [ebp - 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 0x41], 0
test ebx, ebx
je 0x65fdb3
push ebx
call esi
mov al, byte [ebp - 0x41]
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.0076eb7e
mov esp, ebp
pop ebp
ret 4
call fcn.00404650
call fcn.00404650
int3