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

Disassembly:
sub esp, 0x87c
push ebx
push ebp
mov eax, 1
push esi
push edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x8d]
mov byte [esp + 0x8c], 0
mov byte [esp + 0x48c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x48d]
mov edx, dword [0x422900]
rep stosd dword es:[edi], eax
mov ecx, dword [0x4228fc]
mov dword [esp + 0x2c], edx
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [str.zbshareware]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x24], eax
mov ecx, 9
xor eax, eax
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
mov ecx, 0xc
mov dword [esp + 0x1b], eax
lea edi, [esp + 0x59]
mov word [esp + 0x1f], ax
mov byte [esp + 0x18], 0xd
mov byte [esp + 0x21], al
mov byte [esp + 0x58], al
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov al, byte [esp + 0x898]
mov byte [esp + 0x19], 0xa
test al, al
mov eax, dword [esp + 0x890]
mov byte [esp + 0x1a], 0
je 0x410349
test eax, eax
je 0x4104ff
mov ecx, dword [esp + 0x894]
test ecx, ecx
je 0x4104ff
mov ebp, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0
push 3
push 0
push 0
push 0x80000000
push eax
call ebp
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4101aa
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
add esp, 0x87c
ret
lea ecx, [esp + 0x10]
push 0
push ecx
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [esp + 0x60]
push ecx
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41021c
lea esi, [esp + 0x24]
lea eax, [esp + 0x58]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4101fc
test cl, cl
je 0x4101f8
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4101fc
add eax, 2
add esi, 2
test cl, cl
jne 0x4101d8
xor eax, eax
jmp 0x410201
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x41021c
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov eax, 5
pop ebx
add esp, 0x87c
ret
push 0
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x894]
push 0
push 0
push 2
push 0
push 0
push 0xc0000000
push eax
call ebp
mov esi, eax
cmp esi, 0xffffffff
je 0x41032c
lea ecx, [esp + 0x14]
push 0
push ecx
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
lea edx, [esp + 0x2c]
not ecx
dec ecx
push ecx
push edx
push esi
call ebp
mov edx, dword [esp + 0x890]
lea eax, [esp + 0x14]
push 0
push eax
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call ebp
lea ecx, [esp + 0x14]
push 0
push ecx
lea edi, [esp + 0x20]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [esp + 0x20]
push ecx
push edx
push esi
call ebp
mov dword [esp + 0x10], 1
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x94]
push 0x3e8
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x10]
test ecx, ecx
jbe 0x410310
xor eax, eax
test ecx, ecx
jbe 0x4102f5
mov dl, byte [esp + eax + 0x8c]
add dl, 0xc
mov byte [esp + eax + 0x48c], dl
inc eax
cmp eax, ecx
jb 0x4102df
lea eax, [esp + 0x14]
push 0
push eax
push ecx
lea ecx, [esp + 0x498]
push ecx
push esi
call ebp
mov eax, dword [esp + 0x10]
test eax, eax
ja 0x4102b6
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call edi
push esi
call edi
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x87c
ret
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xffffffffffffffff
call esi
push ebx
call esi
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
add esp, 0x87c
ret
test eax, eax
je 0x4104ff
mov eax, dword [esp + 0x894]
test eax, eax
je 0x4104ff
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0
push 3
push 0
push 0
push 0x80000000
push eax
call ebx
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x410396
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
add esp, 0x87c
ret
lea edi, [esp + 0x24]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
push 0
dec ecx
push edx
lea eax, [esp + 0x60]
push ecx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4103f1
lea esi, [esp + 0x24]
lea eax, [esp + 0x58]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4103e8
test cl, cl
je 0x4103e4
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4103e8
add eax, 2
add esi, 2
test cl, cl
jne 0x4103c4
xor eax, eax
jmp 0x4103ed
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x410408
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov eax, 6
pop ebx
add esp, 0x87c
ret
mov dword [esp + 0x10], 1
cmp byte [esp + 0x8c], 0xa
je 0x41043a
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x94]
push 1
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x10]
test eax, eax
ja 0x410410
mov edx, dword [esp + 0x890]
push 0
push 0
push 1
push 0
push 0
push 0xc0000000
push edx
call ebx
mov esi, eax
cmp esi, 0xffffffff
je 0x4104e2
mov eax, dword [esp + 0x10]
test eax, eax
jbe 0x4104c6
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x94]
push 0x3e8
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x10]
test ecx, ecx
jbe 0x4104c6
xor eax, eax
test ecx, ecx
jbe 0x4104ab
mov dl, byte [esp + eax + 0x8c]
sub dl, 0xc
mov byte [esp + eax + 0x48c], dl
inc eax
cmp eax, ecx
jb 0x410495
lea eax, [esp + 0x14]
push 0
push eax
push ecx
lea ecx, [esp + 0x498]
push ecx
push esi
call edi
mov eax, dword [esp + 0x10]
test eax, eax
ja 0x41046c
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push ebp
call esi
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x87c
ret
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xffffffffffffffff
call esi
push ebp
call esi
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
add esp, 0x87c
ret
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x87c
ret