Function at 0x40f3b0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 4]
mov byte [eax + 0x11c], 0
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x124], 0
mov edx, dword [ebp - 4]
mov dword [edx + 0x128], 0
jmp 0x40f3f6
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x128]
add ecx, 1
mov edx, dword [ebp - 4]
mov dword [edx + 0x128], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x128]
cmp ecx, dword [ebp + 0xc]
je 0x40f4f1
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x128]
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x124]
mov ecx, dword [ebp - 4]
mov esi, dword [ebp + 8]
mov al, byte [esi + eax]
mov byte [ecx + edx + 0x32c], al
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x128]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov al, byte [eax + 0x11c]
sub al, byte [ecx + edx]
mov ecx, dword [ebp - 4]
mov byte [ecx + 0x11c], al
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x124]
mov ecx, dword [ebp - 4]
mov dl, byte [ecx + eax + 0x32c]
mov byte [ebp - 8], dl
cmp byte [ebp - 8], 0xd
je 0x40f49a
cmp byte [ebp - 8], 0x40
je 0x40f46f
jmp 0x40f4d7
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x124]
add ecx, 1
mov edx, dword [ebp - 4]
mov dword [edx + 0x124], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x124]
mov edx, dword [ebp - 4]
mov byte [edx + ecx + 0x32c], 0
jmp 0x40f4d7
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x124]
mov edx, dword [ebp - 4]
mov byte [edx + ecx + 0x32c], 0x40
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x124]
add ecx, 1
mov edx, dword [ebp - 4]
mov dword [edx + 0x124], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x124]
mov edx, dword [ebp - 4]
mov byte [edx + ecx + 0x32c], 0xcd
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x124]
add ecx, 1
mov edx, dword [ebp - 4]
mov dword [edx + 0x124], ecx
jmp 0x40f3e1
mov eax, dword [ebp - 4]
mov cl, byte [eax + 0x11c]
mov byte [ebp - 0xc], cl
cmp byte [ebp - 0xc], 0xd
je 0x40f54a
cmp byte [ebp - 0xc], 0x40
je 0x40f50b
jmp 0x40f589
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x124]
mov ecx, dword [ebp - 4]
mov byte [ecx + eax + 0x32c], 0x40
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x124]
add eax, 1
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x124], eax
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x124]
mov ecx, dword [ebp - 4]
mov byte [ecx + eax + 0x32c], 0
jmp 0x40f5a5
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x124]
mov ecx, dword [ebp - 4]
mov byte [ecx + eax + 0x32c], 0x40
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x124]
add eax, 1
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x124], eax
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x124]
mov ecx, dword [ebp - 4]
mov byte [ecx + eax + 0x32c], 0xcd
jmp 0x40f5a5
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x124]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 4]
mov dl, byte [edx + 0x11c]
mov byte [ecx + eax + 0x32c], dl
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x124]
add ecx, 1
mov edx, dword [ebp - 4]
mov dword [edx + 0x124], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x124]
mov edx, dword [ebp - 4]
mov byte [edx + ecx + 0x32c], 0xd
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x124]
add ecx, 1
mov edx, dword [ebp - 4]
mov dword [edx + 0x124], ecx
push 0xf
mov eax, dword [0x41f42c]
push eax
call dword [sym.imp.KERNEL32.dll_PurgeComm]
push 0
mov ecx, dword [ebp - 4]
add ecx, 0x128
push ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x124]
push eax
mov ecx, dword [ebp - 4]
add ecx, 0x32c
push ecx
mov edx, dword [0x41f42c]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 4]
cmp dword [eax + 0x128], 0
jne 0x40f645
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x114], 1
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x114]
jmp 0x40fa0b
mov eax, dword [ebp - 4]
mov dword [eax + 0x118], 0
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x124], 6
mov edx, dword [ebp - 4]
cmp dword [edx + 0x124], 0
je 0x40f703
push 0
mov eax, dword [ebp - 4]
add eax, 0x120
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x128]
push edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x118]
mov edx, dword [ebp - 4]
lea eax, [edx + ecx + 0x12c]
push eax
mov ecx, dword [0x41f42c]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 4]
mov ecx, dword [edx + 0x128]
sub ecx, dword [eax + 0x120]
mov edx, dword [ebp - 4]
mov dword [edx + 0x128], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x118]
mov edx, dword [ebp - 4]
add ecx, dword [edx + 0x120]
mov eax, dword [ebp - 4]
mov dword [eax + 0x118], ecx
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x128], 0
jne 0x40f6e9
jmp 0x40f703
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x124]
sub eax, 1
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x124], eax
jmp 0x40f65f
mov edx, dword [ebp - 4]
cmp dword [edx + 0x124], 0
jne 0x40f72a
mov eax, dword [ebp - 4]
mov dword [eax + 0x114], 2
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + 0x114]
jmp 0x40fa0b
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x118]
sub eax, 1
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x124], eax
jmp 0x40f756
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x124]
sub eax, 1
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x124], eax
mov edx, dword [ebp - 4]
cmp dword [edx + 0x124], 0
je 0x40f7af
xor eax, eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x124]
mov edx, dword [ebp - 4]
xor eax, eax
mov al, byte [edx + ecx + 0x32c]
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x124]
mov ecx, dword [ebp - 4]
xor ebx, ebx
mov bl, byte [ecx + edx + 0x12c]
cmp eax, ebx
je 0x40f7ad
mov edx, dword [ebp - 4]
mov dword [edx + 0x114], 3
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x114]
jmp 0x40fa0b
jmp 0x40f741
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x124], 0x24
mov edx, dword [ebp - 4]
cmp dword [edx + 0x124], 0
je 0x40f886
push 0
mov eax, dword [ebp - 4]
add eax, 0x120
push eax
push 0xff
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x128]
mov eax, dword [ebp - 4]
lea ecx, [eax + edx + 0x12c]
push ecx
mov edx, dword [0x41f42c]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x128]
mov edx, dword [ebp - 4]
add ecx, dword [edx + 0x120]
mov eax, dword [ebp - 4]
mov dword [eax + 0x128], ecx
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x128], 0x203
jbe 0x40f842
mov edx, dword [ebp - 4]
mov dword [edx + 0x114], 4
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x114]
jmp 0x40fa0b
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x128], 0
je 0x40f86c
xor edx, edx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x128]
mov ecx, dword [ebp - 4]
xor edx, edx
mov dl, byte [ecx + eax + 0x12b]
cmp edx, 0xd
jne 0x40f86c
jmp 0x40f886
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x124]
sub ecx, 1
mov edx, dword [ebp - 4]
mov dword [edx + 0x124], ecx
jmp 0x40f7bc
mov eax, dword [ebp - 4]
cmp dword [eax + 0x124], 0
jne 0x40f8ad
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x114], 5
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x114]
jmp 0x40fa0b
mov eax, dword [ebp - 4]
mov byte [eax + 0x11c], 0
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x124], 0
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x128]
sub eax, 1
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x118], eax
mov edx, dword [ebp - 4]
mov dword [edx + 0x128], 0
jmp 0x40f8fd
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x128]
add ecx, 1
mov edx, dword [ebp - 4]
mov dword [edx + 0x128], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 4]
mov edx, dword [eax + 0x128]
cmp edx, dword [ecx + 0x118]
je 0x40f9d5
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x128]
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x124]
mov edx, dword [ebp - 4]
mov esi, dword [ebp - 4]
mov cl, byte [esi + ecx + 0x12c]
mov byte [edx + eax + 0x14], cl
xor edx, edx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x124]
mov ecx, dword [ebp - 4]
xor edx, edx
mov dl, byte [ecx + eax + 0x14]
cmp edx, 0x40
jne 0x40f999
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x128]
add ecx, 1
mov edx, dword [ebp - 4]
mov dword [edx + 0x128], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x124]
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x128]
mov edx, dword [ebp - 4]
mov esi, dword [ebp - 4]
mov cl, byte [edx + ecx + 0x14]
add cl, byte [esi + eax + 0x12c]
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x124]
mov edx, dword [ebp - 4]
mov byte [edx + eax + 0x14], cl
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x124]
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 4]
mov dl, byte [edx + 0x11c]
add dl, byte [eax + ecx + 0x14]
mov eax, dword [ebp - 4]
mov byte [eax + 0x11c], dl
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x124]
add edx, 1
mov eax, dword [ebp - 4]
mov dword [eax + 0x124], edx
jmp 0x40f8e8
mov ecx, dword [ebp - 4]
xor edx, edx
mov dl, byte [ecx + 0x11c]
mov eax, dword [ebp - 4]
mov dword [eax + 0x114], edx
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x114], 0
je 0x40fa02
mov edx, dword [ebp - 4]
mov dword [edx + 0x114], 6
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x114]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8