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

Disassembly:
sub esp, 0x2c
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
push ebx
push ebp
push edi
mov edi, dword [eax + 0x460]
lea ecx, [esp + 0x10]
push ecx
push 1
xor ebx, ebx
push ebx
push ebx
push edx
xor ebp, ebp
mov dword [esp + 0x34], edi
call fcn.022236c0
add esp, 0x14
cmp eax, ebx
mov dword [esp + 0xc], eax
jne 0x2221836
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
push esi
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x18]
cmp ecx, dword [eax + 0x10]
jge 0x2221769
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea edx, [esp + 0x24]
push edx
push 0x10
lea eax, [esp + 0x38]
push eax
push edi
mov dword [esp + 0x34], 0
call esi
test eax, eax
je 0x222175b
cmp dword [esp + 0x20], 0x10
jne 0x222175b
mov ecx, dword [esp + 0x2c]
inc ecx
cmp ecx, ebp
jle 0x22216af
test ebx, ebx
je 0x222168c
push ebx
call fcn.0226affd
add esp, 4
mov ebp, dword [esp + 0x2c]
inc ebp
push ebp
push 1
call fcn.0226b127
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x22216af
mov dword [esp + 0x10], 0x446
jmp 0x2221736
mov eax, dword [esp + 0x2c]
push 0
lea edx, [esp + 0x24]
push edx
push eax
push ebx
push edi
mov dword [esp + 0x34], 0
call esi
test eax, eax
jne 0x22216d0
or eax, 0xffffffff
jmp 0x22216d4
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x2c]
cmp eax, ecx
jne 0x222175b
mov edx, dword [esp + 0x44]
mov eax, dword [edx + 0x578]
add eax, dword [esp + 0x1c]
mov edx, dword [eax + 0x80]
cmp edx, 2
je 0x2221722
cmp edx, 0x14
je 0x2221722
cmp edx, 0x13
je 0x2221722
mov edi, dword [eax + 0xa8]
mov eax, dword [esp + 0x14]
add edi, dword [eax + 0x3c]
mov edx, ecx
shr ecx, 2
mov esi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x24]
jmp 0x2221736
mov ecx, dword [esp + 0x14]
mov eax, dword [eax + 0xa8]
mov edx, dword [ecx + 0x3c]
mov dword [eax + edx], ebx
xor ebp, ebp
xor ebx, ebx
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
inc edx
add ecx, 0xc8
test eax, eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], ecx
je 0x2221633
jmp 0x2221769
push 5
call fcn.022015d0
add esp, 4
mov dword [esp + 0x10], eax
test ebx, ebx
je 0x2221776
push ebx
call fcn.0226affd
add esp, 4
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x2221827
push 1
push 0
push 0
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
call edi
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0xffffffff
jne 0x22217a7
call ebp
test eax, eax
je 0x22217a7
or esi, 0xffffffff
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x28]
push eax
push ecx
call fcn.02235310
add esp, 8
test eax, eax
mov dword [esp + 0x10], eax
jne 0x2221827
mov edx, dword [esp + 0x4c]
mov ebx, dword [esp + 0x24]
push eax
push eax
push edx
push ebx
call edi
cmp eax, 0xffffffff
jne 0x22217d6
call ebp
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x28]
push 0
lea edx, [esp + 0x28]
push edx
push 0x20
push eax
push ebx
mov dword [eax + 0xc], 1
mov dword [eax + 0x18], ecx
mov dword [esp + 0x38], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
push 0
push esi
push ebx
call edi
cmp eax, 0xffffffff
jne 0x2221810
call ebp
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x40]
push eax
push ecx
push edx
call fcn.022552d0
add esp, 0xc
mov eax, dword [esp + 0x14]
push eax
call sym.edb500x.dll_FreeDS
mov eax, dword [esp + 0x10]
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x2c
ret