Function at 0x510076
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x6bcf8a
call fcn.0066bd6c
sub esp, 0x40
and dword [ebp - 0x14], 0
push ebx
push esi
push edi
mov edi, ecx
lea ebx, [edi + 0xd4]
mov esi, ebx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x510097
push 0
lea eax, [ebp - 0x14]
sub esi, ecx
push eax
mov eax, 0xbb7
sub eax, esi
push eax
lea eax, [edi + 0xd4]
add eax, esi
push eax
push dword [edi + 0xac]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
mov eax, dword [ebp - 0x14]
je 0x5100d2
mov byte [ebp - 0xd], 1
test eax, eax
jne 0x5100d6
mov byte [ebp - 0xd], 0
add eax, esi
push 0xa
push ebx
mov byte [eax + edi + 0xd4], 0
mov eax, dword [ebp - 0x14]
add dword [edi + 0x10], eax
adc dword [edi + 0x14], 0
call fcn.0066f4f0
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x510109
push 0xd
push ebx
call fcn.0066f4f0
mov esi, eax
jmp 0x51026f
xor eax, eax
mov dword [ebp - 0x20], 0xf
mov ecx, ebx
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x24], eax
mov byte [ebp - 0x34], al
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x510120
sub ecx, edx
push ecx
push ebx
lea ecx, [ebp - 0x34]
call fcn.0040fe77
xor ecx, ecx
mov dword [ebp - 0x38], 0xf
mov eax, esi
mov dword [ebp - 0x4c], ecx
sub eax, edi
mov dword [ebp - 4], ecx
sub eax, 0xd4
mov dword [ebp - 0x3c], ecx
push eax
push ecx
lea eax, [ebp - 0x34]
mov byte [ebp - 0x4c], cl
push eax
lea ecx, [ebp - 0x4c]
call fcn.00437228
mov eax, dword [ebp - 0x20]
mov byte [ebp - 4], 2
cmp eax, 0x10
jb 0x510198
mov ecx, dword [ebp - 0x34]
inc eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], ecx
cmp eax, 0x1000
jb 0x51018f
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.0042741e
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
push eax
push ecx
call fcn.0066bb0a
pop ecx
pop ecx
and dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0xf
mov byte [ebp - 0x34], 0
jmp 0x5101ae
cmp al, 0x20
jae 0x5101b4
inc esi
mov al, byte [esi]
test al, al
jne 0x5101a9
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x5101b9
sub ecx, edx
lea eax, [ecx + 1]
push eax
push esi
push ebx
call fcn.0066d9b0
push 0xa
push ebx
call fcn.0066f4f0
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x5101ec
push 0xd
push ebx
call fcn.0066f4f0
pop ecx
mov esi, eax
pop ecx
test esi, esi
setne al
lea ecx, [edi + 0xb0]
movzx eax, al
push eax
lea eax, [ebp - 0x4c]
push eax
call fcn.00547664
lea ecx, [edi + 0xb0]
call fcn.00547704
fmul qword [0x6e0cd0]
call fcn.0066c5f0
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
test eax, eax
je 0x510238
lea ecx, [edi + 0xb0]
call fcn.0054733f
call fcn.0066c5f0
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x10], eax
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x38]
cmp eax, 0x10
jb 0x510271
mov ecx, dword [ebp - 0x4c]
inc eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], ecx
cmp eax, 0x1000
jb 0x510268
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.0042741e
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
push eax
push ecx
call fcn.0066bb0a
pop ecx
pop ecx
test esi, esi
jne 0x510109
cmp byte [ebp - 0xd], 0
jne 0x510092
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4