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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x590ea8
mov eax, dword fs:[0]
push eax
mov eax, 0x197c
mov dword fs:[0], esp
call fcn.00554450
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x24], esi
mov dword [ebp - 4], 0
lea eax, [esi + 0x2c]
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], eax
mov byte [ebp - 0x10], 0
call fcn.00410fa0
mov byte [ebp - 4], 1
mov ecx, esi
call fcn.00410ec0
lea ecx, [ebp - 0x1978]
mov dword [ebp - 0x18], ecx
lea ecx, [ebp - 0x1968]
mov ebx, eax
call fcn.0043f590
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x1950]
call fcn.0043f590
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x1938]
call fcn.0043f590
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x1920]
call fcn.0043f590
mov byte [ebp - 4], 7
mov edi, dword [ebp + 0x18]
lea edi, [edi + edi + 2]
mov dword [ebp - 0x197c], edi
add edi, 0x10
push edi
push 8
mov byte [ebp - 0x1988], 0x6f
mov dword [ebp - 0x1984], 6
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x412a64
push 0x10
lea edx, [ebp - 0x1988]
push edx
push edi
push esi
call fcn.00554202
mov eax, dword [ebp + 8]
add esp, 0x10
cmp dword [ebp + 0x1c], 8
jae 0x4127af
lea eax, [ebp + 8]
mov ecx, dword [ebp + 0x18]
lea edx, [ecx + ecx]
push edx
push eax
lea eax, [esi + 0x10]
push edi
push eax
call fcn.00554202
add esp, 0x10
push 0
lea ecx, [ebp - 0x20]
push ecx
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
xor edi, edi
cmp eax, edi
jne 0x412851
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._nError_occurred_while_writing_to_the_server:__d
call fcn.00554fbd
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1988]
call fcn.004110a0
mov byte [ebp - 4], 0
cmp byte [ebp - 0x10], 0
je 0x41282a
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [ebp - 0x10], 0
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp + 0x1c], 8
jb 0x412843
mov eax, dword [ebp + 8]
push eax
call fcn.00448f11
add esp, 4
xor ecx, ecx
mov dword [ebp + 0x18], edi
mov word [ebp + 8], cx
jmp 0x412af2
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push edi
lea edx, [ebp - 0x20]
push edx
push 4
lea eax, [ebp - 0x1c]
push eax
push ebx
mov dword [ebp - 0x1c], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, edi
jne 0x412916
cmp eax, 0xea
je 0x4128ce
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1988]
call fcn.004110a0
mov byte [ebp - 4], 0
cmp byte [ebp - 0x10], 0
je 0x4128ba
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [ebp - 0x10], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.00401cb0
jmp 0x412af9
cmp dword [ebp - 0x1c], 0x6f
je 0x412916
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1988]
call fcn.004110a0
mov byte [ebp - 4], 0
cmp byte [ebp - 0x10], 0
je 0x412902
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [ebp - 0x10], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.00401cb0
jmp 0x412af9
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 0x24]
mov eax, dword [edi + 0x1c]
mov esi, dword [eax]
cmp esi, eax
je 0x4129c1
lea ecx, [ecx]
lea eax, [ebp - 0x40]
lea ecx, [esi + 8]
push eax
call fcn.004087d0
mov byte [ebp - 4], 0xd
cmp dword [eax + 0x14], 8
mov ecx, dword [eax + 0x10]
jb 0x41294b
mov eax, dword [eax]
push ecx
mov ecx, dword [ebp + 0x18]
push eax
push ecx
push 0
lea ecx, [ebp + 8]
call fcn.004071b0
test eax, eax
sete bl
mov byte [ebp - 4], 7
cmp dword [ebp - 0x2c], 8
jb 0x412976
mov edx, dword [ebp - 0x40]
push edx
call fcn.00448f11
add esp, 4
xor eax, eax
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
test bl, bl
jne 0x412997
mov esi, dword [esi]
cmp esi, dword [edi + 0x1c]
jne 0x412930
jmp 0x4129c1
cmp esi, dword [edi + 0x1c]
je 0x4129c1
mov eax, dword [esi + 4]
mov ecx, dword [esi]
mov dword [eax], ecx
mov edx, dword [esi]
mov eax, dword [esi + 4]
lea ecx, [edi + 0x24]
push esi
push ecx
mov dword [edx + 4], eax
call fcn.004022c0
push esi
call fcn.00448f11
add esp, 0xc
dec dword [edi + 0x20]
mov byte [ebp - 4], 1
lea edx, [ebp - 0x1978]
mov dword [ebp - 0x18], edx
mov byte [ebp - 4], 0x11
lea ecx, [ebp - 0x1920]
call fcn.00401000
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0x1938]
call fcn.00401000
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x1950]
call fcn.00401000
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1968]
call fcn.00401000
mov byte [ebp - 4], 0
cmp byte [ebp - 0x10], 0
je 0x412a22
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [ebp - 0x10], 0
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp + 0x1c], 8
jb 0x412a3b
mov ecx, dword [ebp + 8]
push ecx
call fcn.00448f11
add esp, 4
pop edi
xor edx, edx
pop esi
mov dword [ebp + 0x1c], 7
mov dword [ebp + 0x18], 0
mov word [ebp + 8], dx
mov al, 1
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0x1c
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 1
lea eax, [ebp - 0x1978]
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x1920]
call fcn.00401000
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x1938]
call fcn.00401000
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x1950]
call fcn.00401000
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1968]
call fcn.00401000
mov byte [ebp - 4], 0
cmp byte [ebp - 0x10], 0
je 0x412acc
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [ebp - 0x10], 0
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp + 0x1c], 8
jb 0x412ae5
mov edx, dword [ebp + 8]
push edx
call fcn.00448f11
add esp, 4
xor eax, eax
mov dword [ebp + 0x18], 0
mov word [ebp + 8], ax
mov dword [ebp + 0x1c], 7
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor al, al
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0x1c