Function at 0x438740
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 0x18], 0
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x1c], eax
cmp dword [ebp + 0x10], 0
je 0x438779
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
imul edx, edx, 0x24
mov eax, dword [ecx*4 + 0x45b520]
movsx ecx, byte [eax + edx + 4]
and ecx, 2
je 0x438780
xor eax, eax
jmp 0x438b7b
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
imul eax, eax, 0x24
mov ecx, dword [edx*4 + 0x45b520]
movsx edx, byte [ecx + eax + 4]
and edx, 0x48
je 0x438815
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
imul ecx, ecx, 0x24
mov edx, dword [eax*4 + 0x45b520]
movsx eax, byte [edx + ecx + 5]
cmp eax, 0xa
je 0x438815
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
imul edx, edx, 0x24
mov eax, dword [ecx*4 + 0x45b520]
mov ecx, dword [ebp - 0x1c]
mov dl, byte [eax + edx + 5]
mov byte [ecx], dl
mov eax, dword [ebp - 0x1c]
add eax, 1
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x18]
add ecx, 1
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp + 0x10]
sub edx, 1
mov dword [ebp + 0x10], edx
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
imul ecx, ecx, 0x24
mov edx, dword [eax*4 + 0x45b520]
mov byte [edx + ecx + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
imul ecx, ecx, 0x24
mov edx, dword [eax*4 + 0x45b520]
mov eax, dword [edx + ecx]
push eax
call dword [sym.imp.kernel32.dll_ReadFile]
test eax, eax
jne 0x438894
call dword [sym.imp.kernel32.dll_GetLastError]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 5
jne 0x438873
call fcn.004380a0
mov dword [eax], 9
call fcn.004380b0
mov ecx, dword [ebp - 0x10]
mov dword [eax], ecx
or eax, 0xffffffff
jmp 0x438b7b
cmp dword [ebp - 0x10], 0x6d
jne 0x438880
xor eax, eax
jmp 0x438b7b
mov edx, dword [ebp - 0x10]
push edx
call fcn.00438000
add esp, 4
or eax, 0xffffffff
jmp 0x438b7b
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0xc]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
imul edx, edx, 0x24
mov eax, dword [ecx*4 + 0x45b520]
movsx ecx, byte [eax + edx + 4]
and ecx, 0x80
je 0x438b78
cmp dword [ebp - 0xc], 0
je 0x43890f
mov edx, dword [ebp + 0xc]
movsx eax, byte [edx]
cmp eax, 0xa
jne 0x43890f
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
imul edx, edx, 0x24
mov eax, dword [ecx*4 + 0x45b520]
movsx ecx, byte [eax + edx + 4]
or ecx, 4
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
imul eax, eax, 0x24
mov edx, dword [edx*4 + 0x45b520]
mov byte [edx + eax + 4], cl
jmp 0x438947
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
imul ecx, ecx, 0x24
mov edx, dword [eax*4 + 0x45b520]
movsx eax, byte [edx + ecx + 4]
and eax, 0xfffffffb
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
imul edx, edx, 0x24
mov ecx, dword [ecx*4 + 0x45b520]
mov byte [ecx + edx + 4], al
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x14]
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0x18]
cmp dword [ebp - 4], ecx
jae 0x438b6f
mov edx, dword [ebp - 4]
movsx eax, byte [edx]
cmp eax, 0x1a
jne 0x4389ca
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
imul edx, edx, 0x24
mov eax, dword [ecx*4 + 0x45b520]
movsx ecx, byte [eax + edx + 4]
and ecx, 0x40
jne 0x4389c5
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
imul eax, eax, 0x24
mov ecx, dword [edx*4 + 0x45b520]
movsx edx, byte [ecx + eax + 4]
or edx, 2
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
imul ecx, ecx, 0x24
mov eax, dword [eax*4 + 0x45b520]
mov byte [eax + ecx + 4], dl
jmp 0x438b6f
mov ecx, dword [ebp - 4]
movsx edx, byte [ecx]
cmp edx, 0xd
je 0x4389f6
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 4]
mov dl, byte [ecx]
mov byte [eax], dl
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 4]
add ecx, 1
mov dword [ebp - 4], ecx
jmp 0x438b6a
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp + 0xc]
lea ecx, [eax + edx - 1]
cmp dword [ebp - 4], ecx
jae 0x438a4c
mov edx, dword [ebp - 4]
movsx eax, byte [edx + 1]
cmp eax, 0xa
jne 0x438a2b
mov ecx, dword [ebp - 4]
add ecx, 2
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 0x14]
mov byte [edx], 0xa
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [ebp - 0x14], eax
jmp 0x438a47
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 4]
mov al, byte [edx]
mov byte [ecx], al
mov ecx, dword [ebp - 0x14]
add ecx, 1
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
jmp 0x438b6a
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
mov dword [ebp - 0x10], 0
push 0
lea ecx, [ebp - 0xc]
push ecx
push 1
lea edx, [ebp - 5]
push edx
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
imul ecx, ecx, 0x24
mov edx, dword [eax*4 + 0x45b520]
mov eax, dword [edx + ecx]
push eax
call dword [sym.imp.kernel32.dll_ReadFile]
test eax, eax
jne 0x438a95
call dword [sym.imp.kernel32.dll_GetLastError]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x438aa1
cmp dword [ebp - 0xc], 0
jne 0x438ab5
mov ecx, dword [ebp - 0x14]
mov byte [ecx], 0xd
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
jmp 0x438b6a
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
imul ecx, ecx, 0x24
mov edx, dword [eax*4 + 0x45b520]
movsx eax, byte [edx + ecx + 4]
and eax, 0x48
je 0x438b1d
movsx ecx, byte [ebp - 5]
cmp ecx, 0xa
jne 0x438aef
mov edx, dword [ebp - 0x14]
mov byte [edx], 0xa
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [ebp - 0x14], eax
jmp 0x438b1b
mov ecx, dword [ebp - 0x14]
mov byte [ecx], 0xd
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
imul ecx, ecx, 0x24
mov edx, dword [eax*4 + 0x45b520]
mov al, byte [ebp - 5]
mov byte [edx + ecx + 5], al
jmp 0x438b6a
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [ebp + 0xc]
jne 0x438b3f
movsx edx, byte [ebp - 5]
cmp edx, 0xa
jne 0x438b3f
mov eax, dword [ebp - 0x14]
mov byte [eax], 0xa
mov ecx, dword [ebp - 0x14]
add ecx, 1
mov dword [ebp - 0x14], ecx
jmp 0x438b6a
push 1
push 0xffffffffffffffff
mov edx, dword [ebp + 8]
push edx
call fcn.0042eb60
add esp, 0xc
mov dword [ebp - 0x20], eax
movsx eax, byte [ebp - 5]
cmp eax, 0xa
je 0x438b6a
mov ecx, dword [ebp - 0x14]
mov byte [ecx], 0xd
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
jmp 0x438953
mov eax, dword [ebp - 0x14]
sub eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov esp, ebp
pop ebp
ret