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

Disassembly:
sub esp, 0x14
push ebp
mov ebp, ecx
mov eax, dword [ebp]
push esi
lea ecx, [eax + 0x18]
mov eax, dword [ecx]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
mov eax, dword [ebp]
xor edi, edi
cmp eax, edi
mov dword [ebp + 4], 3
je 0x1035c93
cmp dword [eax + 8], 2
jne 0x1035c93
mov eax, dword [esp + 0x28]
xor esi, esi
cmp eax, edi
mov dword [esp + 0xc], edi
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], edi
je 0x1035979
push eax
call fcn.01085340
add esp, 4
inc eax
mov dword [esp + 0x14], eax
mov esi, eax
mov eax, dword [esp + 0x70]
cmp eax, edi
je 0x103598f
push eax
call fcn.01085340
add esp, 4
inc eax
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x54]
add ecx, esi
add ecx, edx
mov edx, dword [esp + 0x64]
push ebx
mov ebx, dword [esp + 0x60]
add ecx, eax
add ecx, ebx
lea eax, [ecx + edx + 0x10c]
push eax
call fcn.0108e46c
mov ebx, eax
add esp, 4
cmp ebx, edi
je 0x1035c6c
xor eax, eax
test esi, esi
mov ecx, 0x43
mov edi, ebx
rep stosd dword es:[edi], eax
mov cl, byte [esp + 0x28]
mov eax, 0x10c
mov dword [ebx + 8], 3
mov byte [ebx + 0x10], cl
je 0x1035a11
mov ecx, esi
mov edx, ecx
shr ecx, 2
mov dword [ebx + 0x18], esi
mov esi, dword [esp + 0x2c]
mov dword [ebx + 0x14], eax
mov eax, dword [esp + 0x18]
lea edi, [ebx + 0x10c]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add eax, 0x10c
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
mov dword [ebx + 0x1c], ecx
mov ecx, dword [esp + 0x3c]
mov dword [ebx + 0x24], ecx
mov ecx, dword [esp + 0x44]
mov dword [ebx + 0x20], edx
mov edx, dword [esp + 0x40]
mov dword [ebx + 0x2c], ecx
mov ecx, dword [esp + 0x4c]
mov dword [ebx + 0x28], edx
mov edx, dword [esp + 0x48]
mov dword [ebx + 0x34], ecx
mov ecx, dword [esp + 0x50]
test ecx, ecx
mov dword [ebx + 0x30], edx
mov edx, dword [esp + 0x70]
mov dword [ebx + 0x58], edx
je 0x1035a74
mov esi, dword [esp + 0x54]
test esi, esi
je 0x1035a74
mov dword [ebx + 0x38], ecx
mov edx, ecx
shr ecx, 2
mov dword [ebx + 0x3c], eax
lea edi, [eax + ebx]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, edx
add eax, ecx
mov ecx, dword [esp + 0x58]
test ecx, ecx
je 0x1035a9f
mov esi, dword [esp + 0x5c]
test esi, esi
je 0x1035a9f
mov dword [ebx + 0x40], ecx
mov edx, ecx
shr ecx, 2
mov dword [ebx + 0x44], eax
lea edi, [eax + ebx]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, edx
add eax, ecx
mov ecx, dword [esp + 0x60]
test ecx, ecx
je 0x1035aca
mov esi, dword [esp + 0x64]
test esi, esi
je 0x1035aca
mov dword [ebx + 0x48], ecx
mov edx, ecx
shr ecx, 2
mov dword [ebx + 0x4c], eax
lea edi, [eax + ebx]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, edx
add eax, ecx
mov ecx, dword [esp + 0x68]
test ecx, ecx
je 0x1035af5
mov esi, dword [esp + 0x6c]
test esi, esi
je 0x1035af5
mov dword [ebx + 0x50], ecx
mov edx, ecx
shr ecx, 2
mov dword [ebx + 0x54], eax
lea edi, [eax + ebx]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, edx
add eax, ecx
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x1035b1c
mov esi, dword [esp + 0x74]
mov dword [ebx + 0x60], ecx
mov edx, ecx
shr ecx, 2
mov dword [ebx + 0x5c], eax
lea edi, [eax + ebx]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, edx
add eax, ecx
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [ebp]
lea edx, [esp + 0x14]
push edx
push eax
push ebx
push ebp
call fcn.01013570
test eax, eax
je 0x1035b49
mov eax, dword [esp + 0x10]
test eax, eax
je 0x1035b49
mov ecx, dword [eax + 0x10]
test ecx, ecx
jne 0x1035b49
mov esi, dword [eax + 0xc]
jmp 0x1035b4e
mov esi, 1
push ebx
call fcn.0108e495
add esp, 4
test esi, esi
jne 0x1035c71
mov edi, dword [esp + 0x30]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x18]
test ecx, ecx
je 0x1035c75
mov ecx, dword [esp + 0x34]
mov dword [eax + 0x20], ecx
mov eax, dword [esp + 0x10]
lea edx, [eax + 0x1c]
push edx
add eax, 0x20
push eax
call edi
mov eax, dword [esp + 0x10]
push 0
lea ecx, [esp + 0x20]
push ecx
mov word [eax + 0x14], 0xffff
mov edx, dword [esp + 0x18]
mov eax, dword [ebp + 0x10]
mov esi, 0x114
push esi
push edx
push eax
call ebx
test eax, eax
je 0x1035bb9
cmp dword [esp + 0x1c], esi
je 0x1035bcf
mov eax, dword [ebp]
mov edx, dword [eax + 0x18]
lea ecx, [eax + 0x18]
push 0
call dword [edx + 0xc]
test eax, eax
je 0x1035c5f
mov ecx, dword [esp + 0x10]
mov edx, dword [ebp + 0x10]
push 0
lea eax, [esp + 0x20]
push eax
push esi
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1035c3b
cmp dword [esp + 0x1c], esi
jne 0x1035c3b
mov eax, dword [esp + 0x10]
cmp dword [eax], 0x52495041
jne 0x1035c28
cmp dword [eax + 8], 3
jne 0x1035c28
cmp word [eax + 0x16], si
jne 0x1035c28
cmp dword [eax + 4], esi
jne 0x1035c28
mov ecx, dword [eax + 0x10]
test ecx, ecx
jne 0x1035c28
cmp word [eax + 0x14], 0xffff
jne 0x1035c28
mov esi, dword [eax + 0xc]
test esi, esi
jne 0x1035c75
jmp 0x1035b6d
mov eax, dword [ebp]
lea ecx, [eax + 0x18]
mov eax, dword [ecx]
push 0
call dword [eax + 0xc]
test eax, eax
je 0x1035c4f
jmp 0x1035c6c
mov eax, dword [ebp]
mov edx, dword [eax + 0x18]
lea ecx, [eax + 0x18]
push 0
call dword [edx + 0xc]
test eax, eax
je 0x1035c5f
jmp 0x1035c6c
mov eax, dword [ebp]
mov edx, dword [eax + 0x18]
lea ecx, [eax + 0x18]
push 0xffffffffffffffff
call dword [edx + 0xc]
jmp 0x1035c6c
mov eax, dword [ebp]
lea ecx, [eax + 0x18]
mov eax, dword [ecx]
push 0xffffffffffffffff
call dword [eax + 0xc]
mov esi, 1
mov eax, dword [esp + 0x10]
xor edi, edi
cmp eax, edi
pop ebx
je 0x1035c85
push eax
call fcn.0108e495
add esp, 4
mov dword [ebp + 4], edi
pop edi
mov eax, esi
pop esi
pop ebp
add esp, 0x14
ret 0x50
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x6c]
mov eax, dword [esp + 0x68]
push ecx
mov ecx, dword [esp + 0x68]
push edx
mov edx, dword [esp + 0x68]
push eax
mov eax, dword [esp + 0x68]
push ecx
mov ecx, dword [esp + 0x68]
push edx
mov edx, dword [esp + 0x68]
push eax
mov eax, dword [esp + 0x68]
push ecx
mov ecx, dword [esp + 0x68]
push edx
mov edx, dword [esp + 0x68]
push eax
mov eax, dword [esp + 0x68]
push ecx
mov ecx, dword [esp + 0x68]
push edx
mov edx, dword [esp + 0x68]
push eax
mov eax, dword [esp + 0x68]
push ecx
mov ecx, dword [esp + 0x68]
push edx
mov edx, dword [esp + 0x68]
push eax
mov eax, dword [esp + 0x68]
push ecx
mov ecx, dword [esp + 0x68]
push edx
mov edx, dword [esp + 0x68]
push eax
mov eax, dword [ebp + 0x10]
push ecx
push edx
push eax
call fcn.0103b960
add esp, 0x54
mov dword [ebp + 4], edi
pop edi
pop esi
pop ebp
add esp, 0x14
ret 0x50