Function at 0x518da1
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x48
push ebx
mov eax, edx
xor edx, edx
push ebp
push esi
push edi
mov ebp, dword [eax + 0xc]
mov edi, ecx
mov ecx, dword [eax + 4]
mov esi, dword [eax + 8]
mov ebx, dword [eax + 0x10]
mov dword [esp + 0x44], eax
mov al, byte [edi + 0x250]
mov byte [esp + 0x17], al
xor eax, eax
mov dword [esp + 0x34], edi
mov dword [esp + 0x30], edx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x20], esi
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x1c], eax
test ecx, ecx
jne 0x518e15
lea eax, [esp + 0x2c]
mov ecx, edi
push eax
push 0x100
call fcn.0051872e
mov edx, dword [esp + 0x38]
pop ecx
pop ecx
mov ecx, eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x3c], eax
mov eax, edx
mov dword [esp + 0x18], ecx
add esi, ecx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x40], esi
mov ebp, ebx
mov dword [esp + 0x28], 1
test ebx, ebx
jle 0x518f8a
cmp dword [edi + 0x250], 0x2100
jne 0x518e80
cmp dword [edi + 0x64], 0
je 0x518e4b
mov ecx, dword [edi + 0x25c]
jmp 0x518e51
mov ecx, dword [edi + 0x258]
push 0
lea eax, [esp + 0x54]
mov edx, esi
push eax
push 1
call fcn.00502737
add esp, 0xc
test eax, eax
jne 0x518f86
mov ebp, dword [esp + 0x54]
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x24], ecx
cmp byte [esi + ebp], al
jmp 0x518f80
cmp byte [esp + 0x17], 0
je 0x518f44
movsx eax, byte [esp + 0x17]
lea ecx, [esi + edx]
push eax
push ecx
call fcn.0051c170
pop ecx
pop ecx
test eax, eax
jne 0x518ebf
mov ecx, dword [esp + 0x30]
mov eax, ebx
sub eax, ecx
push eax
push 0
lea eax, [esi + ecx]
push eax
call fcn.0051e260
add esp, 0xc
test eax, eax
je 0x518f86
mov ebp, eax
sub ebp, esi
mov dword [esp + 0x24], ebp
inc ebp
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x24]
lea eax, [esi + ecx]
mov ecx, dword [esp + 0x34]
add edi, esi
mov esi, dword [esp + 0x5c]
mov edx, esi
push eax
mov bl, byte [edi]
mov byte [edi], 0
call fcn.00517648
or dword [esi], 0x200
mov esi, dword [esp + 0x44]
mov eax, dword [esp + 0x38]
mov byte [edi], bl
pop ecx
mov bl, byte [esi + ebp]
mov ecx, eax
mov byte [esi + ebp], 0
mov edx, dword [eax + 0xb0]
push edi
call fcn.00517648
mov eax, dword [esp + 0x3c]
pop ecx
mov ecx, dword [esp + 0x18]
mov byte [esi + ebp], bl
mov edx, dword [esp + 0x44]
pop edi
pop esi
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x18]
add ecx, ebp
sub eax, ebp
mov dword [edx + 0x10], eax
mov eax, dword [esp + 0x34]
pop ebp
mov dword [edx + 0xc], eax
mov eax, dword [esp + 0x1c]
mov dword [edx + 8], ecx
pop ebx
add esp, 0x48
ret
cmp byte [esi + eax], 0xa
jne 0x518f55
inc eax
cmp byte [esi + eax], 0xa
je 0x518f4a
mov dword [esp + 0x1c], eax
add eax, esi
push 0x5b1f70
push eax
call fcn.0051c3e0
pop ecx
pop ecx
test eax, eax
je 0x518f86
mov ebp, eax
sub ebp, esi
cmp byte [eax], 0xa
mov dword [esp + 0x24], ebp
jne 0x518f7c
inc ebp
cmp byte [esi + ebp], 0xa
je 0x518f75
cmp byte [esi + ebp], 0
jne 0x518ec8
mov ecx, dword [esp + 0x18]
cmp dword [esp + 0x20], 0
mov eax, dword [esp + 0x24]
mov dword [esp + 0x24], eax
jle 0x518faf
lea eax, [ebx + 1]
push eax
push esi
push ecx
call fcn.0051c650
add esp, 0xc
xor esi, esi
mov dword [esp + 0x20], esi
jmp 0x518fb3
mov esi, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x2c]
push eax
lea eax, [esi + 0x80]
mov dword [esp + 0x50], esi
add eax, ebx
mov ecx, edi
push eax
call fcn.0051872e
pop ecx
pop ecx
mov ecx, dword [edi + 0x3a0]
add esi, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x40], esi
mov dword [esp + 0x30], ebx
mov dword [esp + 0x38], ecx
test ecx, ecx
je 0x519062
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x3c], eax
sub eax, ebx
lea edi, [eax - 1]
mov eax, dword [ecx]
cmp eax, dword [ecx + 4]
jbe 0x519039
push str.t__toff___t__tlen
push str.expr__s_:_assert_failed_n
push str.txt_read
push 0x12c
push str.srcliblibawkmisc.c
push 0x55ed0c
push 3
push 0
call fcn.004e8a0a
add esp, 0x20
call fcn.004ee4bf
mov ecx, dword [esp + 0x38]
mov eax, dword [ecx + 4]
sub eax, dword [ecx]
cmp edi, eax
cmovae edi, eax
test edi, edi
je 0x519084
mov eax, dword [ecx + 8]
add eax, dword [ecx]
push edi
push eax
lea eax, [esi + ebx]
push eax
call fcn.0051c650
mov eax, dword [esp + 0x44]
add esp, 0xc
add dword [eax], edi
jmp 0x519084
mov eax, dword [esp + 0x44]
push dword [eax]
mov eax, dword [esp + 0x30]
mov dword [esp + 0x40], eax
sub eax, ebx
dec eax
push eax
lea eax, [esi + ebx]
push 1
push eax
call fcn.005333ca
add esp, 0x10
mov edi, eax
mov edx, dword [esp + 0x30]
add ebx, edi
mov dword [esp + 0x38], ebx
cmp ebx, edx
jge 0x5190c0
xor ebx, ebx
and dword [esp + 0x28], ebx
mov dword [esp + 0x38], ebx
call fcn.0052d3fe
mov edi, dword [esp + 0x34]
mov ecx, edi
movd xmm2, dword [eax]
mov edx, dword [edi + 0xcc]
cvtdq2pd xmm2, xmm2
call fcn.005176c4
mov edx, dword [esp + 0x30]
jmp 0x5190c4
mov edi, dword [esp + 0x34]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x28], eax
mov eax, ebx
mov byte [esi + ebx], 0
cmp ebx, edx
jle 0x5190e7
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
jmp 0x518e15
mov edi, dword [esp + 0x48]
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x18], edi
mov dword [esp + 0x20], edx
mov dword [esp + 0x38], eax
test eax, eax
jne 0x518ecc
dec dword [esp + 0x28]
mov ecx, edi
mov dword [esp + 0x20], edx
jmp 0x518f1c