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

Disassembly:
sub esp, 0x114
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov al, byte [esi + 0x21354]
cmp al, 1
jne 0x41c68a
mov al, byte [esi + 0x21357]
mov dword [esp + 0x18], 0
test al, al
push 0
je 0x41c312
mov ecx, dword [esi + 0x21358]
lea eax, [esp + 0x18]
push eax
mov eax, dword [esi + 0x21364]
lea edx, [esp + 0x18]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x41c2ba
mov ecx, esi
call fcn.0041c720
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret
mov al, byte [esi + 0x21355]
test al, al
jns 0x41c2e1
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x18], 1
push ecx
call fcn.0041c210
mov edx, dword [esi + 0x21318]
add esp, 4
mov byte [edx], al
test byte [esi + 0x21355], 0x40
je 0x41c70d
mov eax, dword [esp + 0x18]
mov al, byte [esp + eax + 0x10]
push eax
call fcn.0041c210
mov ecx, dword [esi + 0x2131c]
add esp, 4
pop edi
pop esi
pop ebp
mov byte [ecx], al
pop ebx
add esp, 0x114
ret
mov eax, dword [esi + 0x21358]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea edx, [esp + 0x18]
lea ecx, [esp + 0x14]
push edx
mov edx, dword [esi + 0x21364]
push eax
push ecx
push edx
call edi
mov eax, dword [esp + 0x14]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
jne 0x41c447
mov al, byte [esi + 0x21356]
test al, al
je 0x41c66a
mov eax, dword [esi + 0x21364]
push 0
push 0
push 8
push eax
call ebx
mov eax, dword [esi + 0x21364]
lea ecx, [esp + 0x20]
push 0
push ecx
lea edx, [esp + 0x24]
push 1
push edx
push eax
call edi
mov ecx, dword [esp + 0x1c]
mov edx, dword [esi + 0x21364]
and ecx, 0xff
push 0
shl ecx, 4
push 0
push ecx
push edx
call ebx
mov edx, dword [esi + 0x21364]
lea eax, [esp + 0x20]
push 0
push eax
lea ecx, [esp + 0x24]
push 1
push ecx
push edx
call edi
mov eax, dword [esp + 0x1c]
mov ecx, dword [esi + 0x21364]
push 1
and eax, 0xff
push 0
push eax
push ecx
call ebx
mov ecx, dword [esi + 0x21364]
lea edx, [esp + 0x20]
push 0
push edx
lea eax, [esp + 0x24]
push 1
push eax
push ecx
call edi
mov edx, dword [esp + 0x1c]
mov eax, dword [esi + 0x21364]
push 1
and edx, 0xff
push 0
push edx
push eax
call ebx
mov eax, dword [esi + 0x21364]
lea ecx, [esp + 0x20]
push 0
push ecx
lea edx, [esp + 0x24]
push 1
push edx
push eax
call edi
mov ecx, dword [esp + 0x1c]
mov edx, dword [esi + 0x21364]
push 1
and ecx, 0xff
push 0
push ecx
push edx
call ebx
mov ecx, dword [esi + 0x21358]
lea eax, [esp + 0x14]
push 0
push eax
push ecx
lea edx, [esp + 0x1c]
mov eax, dword [esi + 0x21364]
push edx
push eax
call edi
mov eax, dword [esp + 0x14]
test eax, eax
je 0x41c344
cmp byte [esp + 0x10], 0xff
jne 0x41c5cf
mov eax, dword [esi + 0x21358]
cmp eax, 1
je 0x41c472
mov edx, dword [esi + 0x21364]
mov ecx, 1
push 1
sub ecx, eax
push 0
push ecx
push edx
call ebx
mov edx, dword [esi + 0x21364]
lea eax, [esp + 0x14]
push 0
push eax
lea ecx, [esp + 0x18]
push 1
push ecx
push edx
call edi
mov al, byte [esp + 0x10]
cmp al, 1
jne 0x41c4b9
mov edx, dword [esi + 0x21364]
lea eax, [esp + 0x14]
push 0
push eax
lea ecx, [esp + 0x18]
push 1
push ecx
push edx
call edi
mov eax, dword [esp + 0x10]
mov ecx, esi
push eax
call fcn.0041c160
jmp 0x41c59c
cmp al, 2
jne 0x41c52d
push 0x20
call fcn.0048ac32
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x41c2a8
mov edx, dword [esi + 0x21364]
lea ecx, [esp + 0x14]
push 0
push ecx
push 0x20
push ebp
push edx
call edi
mov eax, dword [ebp + 4]
mov dword [esp + 0x20], eax
add eax, 0x20
push eax
push ebp
call fcn.0048c170
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x41c2a8
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x14]
push 0
push eax
mov eax, dword [esi + 0x21364]
lea edx, [ebp + 0x20]
push ecx
push edx
push eax
call edi
push esi
push ebp
call fcn.00438e31
push ebp
call fcn.0048ace4
add esp, 0xc
jmp 0x41c59c
cmp al, 3
jne 0x41c59c
mov ecx, dword [esi + 0x21364]
push 1
push 0
push 0
push ecx
call ebx
mov ecx, dword [esi + 0x21364]
sub eax, 2
lea edx, [esp + 0x14]
mov dword [esi + 0x2135c], eax
push 0
push edx
lea eax, [esp + 0x18]
push 1
push eax
push ecx
call edi
mov eax, dword [esp + 0x10]
test al, al
je 0x41c59c
mov ecx, dword [esi + 0x21364]
and eax, 0xff
lea edx, [esp + 0x14]
mov ebp, eax
push 0
push edx
lea eax, [esp + 0x2c]
push ebp
push eax
push ecx
call edi
lea edx, [esp + 0x24]
push 0x1388
push edx
mov byte [esp + ebp + 0x2c], 0
call fcn.00449780
add esp, 8
mov ecx, dword [esi + 0x21358]
lea eax, [esp + 0x14]
push 0
push eax
mov eax, dword [esi + 0x21364]
lea edx, [esp + 0x18]
push ecx
push edx
push eax
call edi
mov eax, dword [esp + 0x14]
test eax, eax
je 0x41c66a
cmp byte [esp + 0x10], 0xff
je 0x41c452
mov ecx, dword [esi + 0x21318]
mov dword [ecx], 0
mov al, byte [esi + 0x21355]
test al, al
jns 0x41c5f9
mov edx, dword [esi + 0x21318]
mov al, byte [esp + 0x10]
mov dword [esp + 0x18], 1
mov byte [edx], al
test byte [esi + 0x21355], 0x40
mov eax, dword [esp + 0x18]
je 0x41c630
mov ecx, dword [esi + 0x2131c]
mov dl, byte [esp + eax + 0x10]
inc eax
mov byte [ecx], dl
mov ecx, dword [esi + 0x2131c]
cmp byte [ecx], 0x30
jne 0x41c630
mov edx, dword [esi + 0x2132c]
mov byte [edx], 4
mov ecx, dword [esi + 0x2131c]
mov byte [ecx], 0
test byte [esi + 0x21355], 0x20
je 0x41c646
mov edx, dword [esi + 0x21320]
mov cl, byte [esp + eax + 0x10]
inc eax
mov byte [edx], cl
test byte [esi + 0x21355], 0x10
je 0x41c70d
mov edx, dword [esi + 0x21324]
mov al, byte [esp + eax + 0x10]
pop edi
pop esi
pop ebp
mov byte [edx], al
pop ebx
add esp, 0x114
ret
call fcn.0044ab50
cmp eax, 6
mov ecx, esi
jne 0x41c2aa
call fcn.0041ce20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret
cmp al, 2
jne 0x41c70d
mov cl, byte [esi + 0x21355]
xor eax, eax
test cl, cl
jns 0x41c6ab
mov edx, dword [esi + 0x21318]
mov al, byte [edx]
mov byte [esp + 0x18], al
mov eax, 1
test cl, 0x40
je 0x41c6cf
mov edx, dword [esi + 0x2132c]
cmp byte [edx], 0
je 0x41c6c2
mov byte [esp + eax + 0x18], 0x30
jmp 0x41c6ce
mov edx, dword [esi + 0x2131c]
mov dl, byte [edx]
mov byte [esp + eax + 0x18], dl
inc eax
test cl, 0x20
je 0x41c6e1
mov edx, dword [esi + 0x21320]
inc eax
mov dl, byte [edx]
mov byte [esp + eax + 0x17], dl
test cl, 0x10
je 0x41c6f3
mov ecx, dword [esi + 0x21324]
inc eax
mov dl, byte [ecx]
mov byte [esp + eax + 0x17], dl
lea ecx, [esp + 0x20]
push 0
push ecx
push eax
mov eax, dword [esi + 0x21364]
lea edx, [esp + 0x24]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret