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

Disassembly:
push ebp
lea ebp, [esp - 0x20c]
sub esp, 0x20c
push 0xfffffffffffffffe
push 0x1016c6f8
push 0x10118480
mov eax, dword fs:[0]
push eax
sub esp, 0xb4
mov eax, dword [0x1017455c]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp + 0x208], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov esi, ecx
mov edi, edx
mov eax, dword [ebp + 0x214]
mov dword [ebp - 0x44], eax
xor ebx, ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x3c], 0xffffffff
mov dword [ebp - 0x7c], ebx
xor eax, eax
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0xc4], ebx
push 0x40
push ebx
lea ecx, [ebp - 0xbc]
push ecx
call fcn.10116880
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x40], ebx
mov byte [ebp], bl
push 0x103
push ebx
lea edx, [ebp + 1]
push edx
call fcn.10116880
mov byte [ebp + 0x104], bl
push 0x103
push ebx
lea eax, [ebp + 0x105]
push eax
call fcn.10116880
add esp, 0x24
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 4], ebx
call fcn.10010610
test eax, eax
je 0x10011caf
cmp esi, ebx
je 0x10011caf
cmp byte [esi], bl
je 0x10011caf
cmp edi, ebx
je 0x10011caf
cmp byte [edi], bl
je 0x10011caf
push ebx
lea ecx, [ebp]
push ecx
push 0x104
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
call esi
test eax, eax
je 0x10011caf
push ebx
lea edx, [ebp + 0x104]
push edx
push 0x104
push edi
call esi
test eax, eax
je 0x10011caf
lea edx, [ebp - 0x7c]
lea ecx, [ebp]
call fcn.10010920
mov dword [ebp - 0x20], eax
cmp eax, ebx
je 0x10011caf
test dword [ebp - 0x70], 0xa00
jne 0x10011caf
lea edx, [ebp - 0xc4]
mov ecx, dword [ebp - 0x78]
call fcn.10010da0
mov dword [ebp - 0x20], eax
cmp eax, ebx
je 0x10011caf
test dword [ebp - 0x80], 0x8000
jne 0x10011caf
push ebx
push 2
push ebx
push 0x40000000
lea edi, [ebp + 0x104]
call fcn.10033690
add esp, 0x10
mov dword [ebp - 0x3c], eax
call fcn.1004cb20
test eax, eax
je 0x10011caf
mov eax, dword [ebp - 0x44]
cmp eax, ebx
je 0x100119c7
mov dword [eax], ebx
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x7c]
push ecx
lea edx, [ebp - 0xc4]
push edx
call fcn.10011250
add esp, 0xc
mov ebx, eax
mov dword [ebp - 0x20], ebx
test ebx, ebx
je 0x10011caf
mov eax, dword [ebp - 0x24]
cmp dword [eax], 0
jne 0x10011a5e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x26
jne 0x10011a5e
lea ecx, [ebp - 0x34]
push ecx
lea edx, [ebp - 0x7c]
push edx
lea ecx, [ebp - 0xc4]
call fcn.10011460
add esp, 8
mov dword [ebp - 0x20], eax
test eax, eax
je 0x10011caf
push 0
lea eax, [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax]
push ecx
add eax, 4
push eax
mov edx, dword [ebp - 0x3c]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x20], eax
test eax, eax
je 0x10011caf
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax]
cmp ecx, dword [ebp - 0x38]
jne 0x10011caf
mov dword [ebp - 0x40], 1
jmp 0x10011c7f
push 4
push 0x1000
mov edx, dword [ebp - 0x94]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x28], eax
test eax, eax
je 0x10011caf
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x68]
mov dword [ebp - 0x2c], ecx
xor edi, edi
mov dword [ebp - 0x58], edi
mov edx, dword [ebp - 0x24]
cmp edi, dword [edx]
jae 0x10011c3c
xor ecx, ecx
mov dword [ebp - 0x5c], ecx
mov eax, edi
shl eax, 4
add eax, edx
cmp ecx, dword [eax + 8]
jae 0x10011c68
mov edx, dword [eax + 0x10]
mov esi, dword [eax + 0x14]
cmp edx, 0xffffffff
jne 0x10011ac3
cmp esi, edx
je 0x10011c5c
mov eax, ecx
xor ecx, ecx
add eax, edx
mov dword [ebp - 0x50], eax
adc ecx, esi
mov dword [ebp - 0x4c], ecx
push ecx
push eax
push 0
mov ecx, dword [ebp - 0x94]
push ecx
call fcn.1011e420
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], edx
mov ecx, dword [ebp - 0xbc]
add eax, ecx
mov dword [ebp - 0x50], eax
mov ecx, dword [ebp - 0xb8]
adc edx, ecx
mov dword [ebp - 0x4c], edx
push 0
push 0
push edx
push eax
mov edx, dword [ebp - 0xc4]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov ebx, eax
mov dword [ebp - 0x20], ebx
test ebx, ebx
je 0x10011c35
mov eax, dword [ebp - 0x94]
push eax
push 0
mov edi, dword [ebp - 0x28]
push edi
call fcn.10116880
add esp, 0xc
push 0
lea ecx, [ebp - 0x48]
push ecx
mov edx, dword [ebp - 0x94]
push edx
push edi
mov eax, dword [ebp - 0xc4]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, dword [ebp - 0x94]
test eax, eax
je 0x10011b63
cmp esi, dword [ebp - 0x48]
jne 0x10011b63
mov eax, 1
jmp 0x10011b65
xor eax, eax
mov ebx, eax
mov dword [ebp - 0x20], ebx
test ebx, ebx
je 0x10011c35
xor eax, eax
cmp dword [ebp - 0x2c], eax
jg 0x10011b83
jl 0x10011b80
cmp dword [ebp - 0x30], esi
jae 0x10011b83
mov esi, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x3c]
mov eax, ecx
call fcn.1004cb20
test eax, eax
je 0x10011bc4
push 0
lea edx, [ebp - 0x38]
push edx
push esi
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10011bb8
cmp esi, dword [ebp - 0x38]
jne 0x10011bb8
mov eax, 1
mov ebx, eax
mov dword [ebp - 0x20], ebx
add dword [ebp - 0x1c], esi
jmp 0x10011c2a
xor eax, eax
mov ebx, eax
mov dword [ebp - 0x20], ebx
add dword [ebp - 0x1c], esi
jmp 0x10011c2a
xor edi, edi
mov eax, dword [edi]
test eax, eax
jne 0x10011bf5
push esi
call fcn.1010dced
add esp, 4
mov dword [edi], eax
test eax, eax
jne 0x10011be2
xor ebx, ebx
mov dword [ebp - 0x20], ebx
jmp 0x10011c2e
push esi
mov ecx, dword [ebp - 0x28]
push ecx
push eax
call fcn.101162d0
add esp, 0xc
add dword [ebp - 0x1c], esi
jmp 0x10011c2a
mov edx, dword [ebp - 0x1c]
lea edi, [edx + esi]
push edi
push eax
call fcn.1010f6f2
add esp, 8
xor ecx, ecx
mov dword [ecx], eax
test eax, eax
jne 0x10011c14
xor ebx, ebx
mov dword [ebp - 0x20], ebx
jmp 0x10011c2e
push esi
mov ecx, dword [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x1c]
add eax, edx
push eax
call fcn.101162d0
add esp, 0xc
mov dword [ebp - 0x1c], edi
test ebx, ebx
jne 0x10011c4f
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x54], 1
test ebx, ebx
je 0x10011c75
mov eax, dword [ebp - 0x30]
or eax, dword [ebp - 0x2c]
jne 0x10011c75
mov eax, 1
jmp 0x10011c77
sub dword [ebp - 0x30], esi
sbb dword [ebp - 0x2c], 0
mov edi, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x5c]
inc ecx
mov dword [ebp - 0x5c], ecx
mov edx, dword [ebp - 0x24]
jmp 0x10011aa0
xor eax, eax
jne 0x10011c3c
inc edi
mov dword [ebp - 0x58], edi
jmp 0x10011a93
xor eax, eax
mov dword [ebp - 0x40], eax
cmp eax, 1
jne 0x10011c8d
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x10011caf
mov ecx, dword [ebp - 0x1c]
mov dword [eax], ecx
jmp 0x10011caf
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x10011c9a
mov dword [eax], 0
xor esi, esi
je 0x10011caf
mov eax, dword [esi]
test eax, eax
je 0x10011caf
push eax
call fcn.1010dc10
add esp, 4
mov dword [esi], esi
mov dword [ebp - 4], 0xfffffffe
call fcn.10011ce3
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x208]
xor ecx, ebp
call fcn.1010d699
add ebp, 0x20c
mov esp, ebp
pop ebp
ret