Function at 0x409bc9
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push esi
push edi
mov dword [ebp - 0x18], 0
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
mov eax, dword [ebp + 0x20]
mov ebx, dword [esi]
mov ecx, dword [edi]
mov edx, dword [eax]
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x10], edx
mov ebx, dword [ebp + 0x24]
mov eax, dword [ebx]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x10], 1
jne 0x409c15
inc dword [ebp - 0x10]
mov esi, 0x210
mov edi, dword [ebp + 0xc]
mov dword [ebp - 8], 0
jmp 0x409d90
mov edi, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
mov esi, dword [ebp - 0xc]
sub ecx, esi
mov dword [ebp - 8], ecx
je 0x409cff
add esi, edi
pushfd
cld
rep movsb byte es:[edi], byte [esi]
popfd
mov ecx, dword [ebp - 8]
mov ax, 0xd
mov edi, dword [ebp + 0xc]
pushfd
shr ecx, 1
cld
repne scasw ax, word es:[edi]
je 0x409c45
xor eax, eax
popfd
test eax, eax
je 0x409cf0
test ecx, ecx
je 0x409cf0
cmp word [edi], 0xa
jne 0x409cc7
mov word [edi - 2], 0
sub edi, dword [ebp + 0xc]
mov ecx, edi
inc edi
inc edi
mov dword [ebp - 0xc], edi
mov esi, dword [ebp + 0xc]
mov ax, word [esi]
dec ecx
inc esi
dec ecx
inc esi
cmp ax, 0x20
je 0x409c6f
cmp ax, 9
je 0x409c6f
dec esi
dec esi
mov edi, esi
test ecx, ecx
je 0x409c15
add edi, ecx
dec edi
dec edi
cmp edi, esi
jb 0x409ca1
mov ax, word [edi]
cmp ax, 0x20
je 0x409c8c
cmp ax, 9
je 0x409c8c
inc edi
inc edi
mov word [edi], 0
cmp esi, edi
je 0x409c15
mov dword [ebp - 0x18], 1
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x1c]
mov dword [eax], esi
sub edi, esi
inc edi
inc edi
shr edi, 1
mov dword [ecx], edi
mov ebx, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
mov eax, dword [ebp + 0x20]
mov dword [esi], ebx
mov dword [edi], ecx
mov dword [eax], edx
mov ebx, dword [ebp + 0x24]
mov eax, dword [ebp - 0x14]
mov dword [ebx], eax
mov eax, dword [ebp - 0x18]
pop edi
pop esi
leave
ret 0x20
cmp dword [ebp - 0x10], 0
jne 0x409d05
mov dword [ebp - 0x10], 2
jmp 0x409cc7
cmp dword [ebp - 0x10], 0
je 0x409cc7
mov esi, 0x210
sub esi, dword [ebp - 8]
je 0x409cc7
cmp dword [ebp - 0x14], 0
jne 0x409d17
shr esi, 1
push 0
lea eax, [ebp - 4]
push eax
push esi
push edi
push dword [ebp + 8]
call sub.KERNEL32.dll_ReadFile
cmp dword [ebp - 0x14], 0
jne 0x409d50
pushfd
push eax
std
mov ebx, esi
mov ecx, dword [ebp - 4]
mov esi, edi
add esi, ecx
dec esi
shl ecx, 1
add edi, ecx
dec edi
xor eax, eax
shr ecx, 1
stosb byte es:[edi], al
movsb byte es:[edi], byte [esi]
loop 0x409d43
mov esi, ebx
pop eax
popfd
shl esi, 1
shl dword [ebp - 4], 1
test eax, eax
je 0x409d76
mov ecx, dword [ebp - 4]
add dword [ebp - 8], ecx
cmp ecx, esi
je 0x409c30
mov dword [ebp - 0x10], 0
test ecx, ecx
jne 0x409c30
jmp 0x409cc7
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x26
jne 0x409cc7
mov dword [ebp - 0x10], 0
jmp 0x409cc7
push 0
lea eax, [ebp - 4]
push eax
push 2
push edi
push dword [ebp + 8]
call sub.KERNEL32.dll_ReadFile
cmp dword [ebp - 4], 2
jne 0x409cc7
cmp word [edi], 0xfeff
jne 0x409dba
inc dword [ebp - 0x14]
jmp 0x409d17
xor ebx, ebx
push 0
push ebx
push ebx
push dword [ebp + 8]
call sub.KERNEL32.dll_SetFilePointer
cmp eax, 0xffffffff
je 0x409cc7
jmp 0x409d15