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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x591048
push eax
mov eax, 0x1960
mov dword fs:[0], esp
call fcn.00554450
push ebx
push esi
mov esi, ecx
lea eax, [esi + 0x2c]
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], eax
mov byte [ebp - 0x10], 0
call fcn.00410fa0
mov dword [ebp - 4], 0
mov ecx, esi
call fcn.00410ec0
lea ecx, [ebp - 0x195c]
mov esi, eax
mov dword [ebp - 0x20], ecx
lea ecx, [ebp - 0x194c]
mov dword [ebp - 0x1c], esi
call fcn.0043f590
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1934]
call fcn.0043f590
mov ebx, 2
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x191c]
call fcn.0043f590
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x1904]
call fcn.0043f590
mov byte [ebp - 4], 6
push 0
lea edx, [ebp - 0x24]
push edx
push 0x11
lea eax, [ebp - 0x196c]
push eax
push esi
mov byte [ebp - 0x196c], 0x6f
mov dword [ebp - 0x1968], ebx
mov dword [ebp - 0x1960], 1
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x412fac
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._nError_occurred_while_writing_SH_GET_OPTIONS_to_the_server:__d
call fcn.00554fbd
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x195c]
mov dword [ebp + 8], ecx
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x1904]
call fcn.00401000
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x191c]
call fcn.00401000
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x1934]
call fcn.00401000
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x194c]
call fcn.00401000
mov dword [ebp - 4], 0xffffffff
cmp byte [ebp - 0x10], 0
je 0x412f98
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [ebp - 0x10], 0
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0x50
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
push 0
lea eax, [ebp - 0x18]
push eax
push 0x10
lea ecx, [ebp - 0x196c]
push ecx
push esi
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x6d
jne 0x412fee
call edi
push eax
push str.Server_disconnected___d_n
call fcn.00554fbd
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x413278
cmp eax, 0xea
je 0x412ffd
test eax, eax
jne 0x413278
cmp dword [ebp - 0x18], 0x10
jb 0x413278
cmp byte [ebp - 0x196c], 0x6f
jne 0x413278
mov edx, dword [ebp - 0x1960]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x413278
mov ecx, dword [ebp - 0x1960]
push 0
lea eax, [ebp - 0x18]
push eax
push ecx
push edi
push esi
call ebx
test eax, eax
setne bl
call dword [sym.imp.KERNEL32.dll_GetLastError]
test bl, bl
jne 0x4130a4
cmp eax, 0xea
je 0x4130a4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x196c]
call fcn.004110a0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00411110
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0x50
movzx esi, byte [edi]
mov ecx, dword [ebp + 8]
mov edx, esi
shr edx, 1
push edx
lea eax, [edi + 4]
push eax
call fcn.00404e30
movzx ebx, byte [esi + edi + 4]
mov ecx, ebx
shr ecx, 1
add esi, 8
push ecx
mov ecx, dword [ebp + 0x10]
lea edx, [esi + edi]
push edx
call fcn.00404e30
add esi, ebx
movzx ebx, byte [esi + edi]
mov eax, ebx
shr eax, 1
add esi, 4
push eax
lea ecx, [esi + edi]
push ecx
mov ecx, dword [ebp + 0x14]
call fcn.00404e30
mov ecx, dword [ebp + 0x18]
add esi, ebx
movzx ebx, byte [esi + edi]
mov edx, ebx
shr edx, 1
add esi, 4
push edx
lea eax, [esi + edi]
push eax
call fcn.00404e30
add esi, ebx
movzx ebx, byte [esi + edi]
mov ecx, ebx
shr ecx, 1
add esi, 4
push ecx
mov ecx, dword [ebp + 0x1c]
lea edx, [esi + edi]
push edx
call fcn.00404e30
add esi, ebx
movzx ebx, byte [esi + edi]
mov eax, ebx
shr eax, 1
add esi, 4
push eax
lea ecx, [esi + edi]
push ecx
mov ecx, dword [ebp + 0x20]
call fcn.00404e30
mov ecx, dword [ebp + 0x24]
add esi, ebx
movzx ebx, byte [esi + edi]
mov edx, ebx
shr edx, 1
add esi, 4
push edx
lea eax, [esi + edi]
push eax
call fcn.00404e30
add esi, ebx
movzx ebx, byte [esi + edi]
mov ecx, ebx
shr ecx, 1
add esi, 4
push ecx
mov ecx, dword [ebp + 0x2c]
lea edx, [esi + edi]
push edx
call fcn.00404e30
add esi, ebx
movzx ebx, byte [esi + edi]
add esi, 4
mov eax, ebx
shr eax, 1
push eax
lea ecx, [esi + edi]
push ecx
mov ecx, dword [ebp + 0x30]
call fcn.00404e30
mov ecx, dword [ebp + 0x34]
add esi, ebx
movzx ebx, byte [esi + edi]
mov edx, ebx
shr edx, 1
add esi, 4
push edx
lea eax, [esi + edi]
push eax
call fcn.00404e30
add esi, ebx
movzx ebx, byte [esi + edi]
mov ecx, ebx
shr ecx, 1
add esi, 4
push ecx
mov ecx, dword [ebp + 0x38]
lea edx, [esi + edi]
push edx
call fcn.00404e30
add esi, ebx
movzx ebx, byte [esi + edi]
mov eax, ebx
shr eax, 1
add esi, 4
push eax
lea ecx, [esi + edi]
push ecx
mov ecx, dword [ebp + 0x3c]
call fcn.00404e30
mov ecx, dword [ebp + 0x4c]
add esi, ebx
movzx ebx, byte [esi + edi]
mov edx, ebx
shr edx, 1
add esi, 4
push edx
lea eax, [esi + edi]
push eax
call fcn.00404e30
add esi, ebx
movzx ebx, byte [esi + edi]
mov ecx, ebx
shr ecx, 1
add esi, 4
push ecx
mov ecx, dword [ebp + 0x50]
lea edx, [esi + edi]
push edx
call fcn.00404e30
add esi, ebx
movzx ebx, byte [esi + edi]
mov eax, ebx
shr eax, 1
add esi, 4
push eax
lea ecx, [esi + edi]
push ecx
mov ecx, dword [ebp + 0x54]
call fcn.00404e30
mov eax, dword [ebp + 0xc]
add esi, ebx
cmp byte [esi + edi], 0
setne dl
mov byte [eax], dl
cmp byte [esi + edi + 1], 0
mov edx, dword [ebp + 0x28]
setne cl
mov byte [edx], cl
cmp byte [esi + edi + 2], 0
mov ecx, dword [ebp + 0x40]
setne al
mov byte [ecx], al
cmp byte [esi + edi + 3], 0
setne dl
mov eax, dword [ebp + 0x44]
mov byte [eax], dl
cmp byte [esi + edi + 4], 0
mov edx, dword [ebp + 0x48]
push edi
setne cl
push 0
mov byte [edx], cl
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [ebp - 0x1c]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0
lea eax, [ebp - 0x195c]
mov dword [ebp + 8], eax
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x1904]
call fcn.00401000
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x191c]
call fcn.00401000
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x1934]
call fcn.00401000
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x194c]
call fcn.00401000
mov dword [ebp - 4], 0xffffffff
cmp byte [ebp - 0x10], 0
je 0x4132e3
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [ebp - 0x10], 0
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov al, 1
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0x50