Function at 0x420550
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
push ebx
push esi
push edi
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
mov eax, dword [ebp + 0xc]
push eax
call sub.KERNEL32.DLL_CreateFileA
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x420584
xor eax, eax
jmp 0x4207c7
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
mov edx, dword [ebp + 0x10]
push edx
call sub.KERNEL32.DLL_CreateFileA
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x4205b8
mov ecx, dword [ebp - 4]
push ecx
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
jmp 0x4207c7
lea edx, [ebp - 0xc]
push edx
mov ecx, dword [ebp - 4]
push ecx
call sub.KERNEL32.DLL_GetFileSize
mov dword [ebp - 0x14], eax
cmp dword [ebp + 0x14], 0
je 0x4205f3
xor eax, eax
lea edx, [ebp - 0x18]
mov ecx, eax
add ecx, ecx
lea ecx, [ecx + ecx*2]
mov ebx, dword [ebp - 0x14]
shr ebx, cl
and ebx, 0x3f
mov cl, byte [ebx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [edx], cl
inc eax
inc edx
cmp eax, 4
jl 0x4205d3
jmp 0x42060b
xor eax, eax
lea edx, [ebp - 0x18]
mov ecx, eax
shl ecx, 3
mov ebx, dword [ebp - 0x14]
shr ebx, cl
mov byte [edx], bl
inc eax
inc edx
cmp eax, 4
jl 0x4205f8
lea eax, [ebp - 0xc]
push 0
push eax
lea edx, [ebp - 0x18]
push 4
push edx
mov ecx, dword [ebp - 8]
push ecx
call sub.KERNEL32.DLL_WriteFile
test eax, eax
je 0x42062a
cmp dword [ebp - 0xc], 4
je 0x420643
mov eax, dword [ebp - 4]
push eax
call sub.KERNEL32.DLL_CloseHandle
mov edx, dword [ebp - 8]
push edx
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
jmp 0x4207c7
mov edx, dword [ebp + 8]
mov ebx, 3
mov ecx, dword [edx + 0x5ec]
xor edx, edx
mov eax, ecx
div ebx
mov ebx, eax
mov eax, ecx
mov ecx, 3
xor edx, edx
div ecx
test edx, edx
je 0x42066c
mov al, 1
jmp 0x42066e
xor eax, eax
add bl, al
xor ecx, ecx
mov byte [ebp - 0x19], bl
mov dl, byte [ebp - 0x19]
shl edx, 2
mov byte [ebp - 0x1a], dl
xor edx, edx
mov cl, byte [ebp - 0x19]
mov dl, byte [ebp - 0x1a]
lea ebx, [ecx + ecx*2]
mov eax, ebx
add eax, edx
push eax
call fcn.004d29b4
pop ecx
mov esi, eax
add ebx, esi
mov dword [ebp - 0x20], ebx
push 0
lea eax, [ebp - 0xc]
push eax
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 0x5ec]
push ecx
push esi
mov eax, dword [ebp - 4]
push eax
call sub.KERNEL32.DLL_ReadFile
test eax, eax
je 0x4207a4
cmp dword [ebp - 0xc], 0
je 0x4207a4
push esi
push esi
mov edx, dword [ebp + 8]
push edx
call fcn.00420e78
add esp, 0xc
cmp dword [ebp + 0x14], 0
je 0x420773
xor edi, edi
mov eax, dword [ebp - 0x20]
mov edx, eax
mov eax, esi
jmp 0x420725
mov cl, byte [eax]
mov byte [edx], cl
xor ecx, ecx
mov cl, byte [eax]
sar ecx, 6
mov bl, byte [eax + 1]
shl ebx, 2
or cl, bl
mov byte [edx + 1], cl
xor ecx, ecx
mov cl, byte [eax + 1]
sar ecx, 4
mov bl, byte [eax + 2]
shl ebx, 4
or cl, bl
mov byte [edx + 2], cl
xor ecx, ecx
mov cl, byte [eax + 2]
sar ecx, 2
mov byte [edx + 3], cl
inc edi
add edx, 4
add eax, 3
xor ecx, ecx
mov cl, byte [ebp - 0x19]
cmp edi, ecx
jl 0x4206ea
xor edx, edx
mov eax, dword [ebp - 0x20]
jmp 0x420746
xor ecx, ecx
mov cl, byte [eax]
and ecx, 0x3f
mov cl, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [eax], cl
inc edx
inc eax
xor ecx, ecx
mov cl, byte [ebp - 0x1a]
cmp edx, ecx
jl 0x420735
push 0
lea eax, [ebp - 0x10]
push eax
xor ebx, ebx
mov bl, byte [ebp - 0x1a]
push ebx
mov eax, dword [ebp - 0x20]
push eax
mov edx, dword [ebp - 8]
push edx
call sub.KERNEL32.DLL_WriteFile
test eax, eax
je 0x4207a4
cmp ebx, dword [ebp - 0x10]
jne 0x4207a4
jmp 0x420799
push 0
lea ecx, [ebp - 0x10]
push ecx
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x5ec]
push edx
push esi
mov ecx, dword [ebp - 8]
push ecx
call sub.KERNEL32.DLL_WriteFile
test eax, eax
je 0x4207a4
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x10]
jne 0x4207a4
mov edx, dword [ebp - 0xc]
sub dword [ebp - 0x14], edx
jmp 0x42069b
push esi
call fcn.004d27ec
pop ecx
mov ecx, dword [ebp - 4]
push ecx
call sub.KERNEL32.DLL_CloseHandle
mov eax, dword [ebp - 8]
push eax
call sub.KERNEL32.DLL_CloseHandle
cmp dword [ebp - 0x14], 0
sete al
and eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret