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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x405de7
mov eax, dword fs:[0]
push eax
mov eax, 0x40224
call fcn.004047c0
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x40228], eax
xor ebx, ebx
push ebx
lea eax, [ebp - 0x4022c]
push eax
mov esi, 0x200
push esi
lea eax, [ebp - 0x40214]
push eax
push dword [edi]
mov byte [ebp - 0x40215], 1
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebx
je 0x4027fd
cmp dword [ebp - 0x4022c], esi
jne 0x4027fd
push 4
lea eax, [ebp - 0x40113]
push 0x4063b4
push eax
call sub.msvcrt.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x402779
mov eax, dword [ebp - 0x40228]
mov byte [eax], 1
mov al, 1
jmp 0x4027ff
push 5
lea eax, [ebp - 0x40113]
push 0x4063ac
push eax
call sub.msvcrt.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x4027fd
mov eax, dword [edi + 4]
sub eax, 0x10
call fcn.00402482
add eax, 0x10
mov dword [ebp - 0x4021c], eax
push 0x406428
lea eax, [ebp - 0x4021c]
push eax
mov dword [ebp - 4], ebx
call fcn.00402940
lea eax, [ebp - 0x40214]
push eax
lea eax, [ebp - 0x4021c]
push eax
call fcn.00402940
mov esi, dword [ebp - 0x4021c]
push ebx
push 0x100
push 2
push ebx
push ebx
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x40228], eax
jne 0x40281a
lea eax, [esi - 0x10]
call fcn.00401081
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004047a0
leave
ret 4
push 8
lea eax, [ebp - 0x40198]
push ebx
push eax
call sub.msvcrt.dll_strtol
add esp, 0xc
push 1
push ebx
push ebx
push dword [edi]
mov esi, eax
mov dword [ebp - 0x40220], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
add eax, dword [ebp - 0x40220]
neg esi
and esi, 0x1ff
add esi, eax
cmp dword [ebp - 0x40220], ebx
mov dword [ebp - 0x40230], esi
jbe 0x4028d5
mov ecx, dword [ebp - 0x40220]
mov eax, 0x40000
cmp ecx, eax
mov dword [ebp - 0x40224], eax
jae 0x402879
mov dword [ebp - 0x40224], ecx
push ebx
lea eax, [ebp - 0x4022c]
push eax
push dword [ebp - 0x40224]
lea eax, [ebp - 0x40014]
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4028cf
push ebx
lea eax, [ebp - 0x4022c]
push eax
push dword [ebp - 0x40224]
lea eax, [ebp - 0x40014]
push eax
push dword [ebp - 0x40228]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4028cf
mov eax, dword [ebp - 0x40224]
sub dword [ebp - 0x40220], eax
jne 0x40285e
jmp 0x4028d5
mov byte [ebp - 0x40215], bl
push dword [ebp - 0x40228]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 0x40215], bl
je 0x402917
cmp byte [edi + 8], bl
je 0x402903
lea eax, [ebp - 0x4021c]
push eax
lea esi, [edi + 0xc]
call fcn.004020b3
mov esi, dword [ebp - 0x40230]
mov eax, dword [edi + 0x18]
cmp eax, ebx
je 0x402917
push dword [ebp - 0x4021c]
push dword [edi + 0x1c]
call eax
pop ecx
pop ecx
cmp esi, 0xffffffff
je 0x402927
push ebx
push ebx
push esi
push dword [edi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp - 0x4021c]
add eax, 0xfffffff0
call fcn.00401081
mov al, byte [ebp - 0x40215]
jmp 0x4027ff