Function at 0x420228
Capabilities:
Encode data using xor
Get file size
Read file on windows

Disassembly:
sub esp, 0x44
mov eax, dword [0x5107c0]
xor eax, esp
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x48]
push ebx
push ebp
mov ebp, dword [esp + 0x58]
mov ecx, dword [esp + 0x54]
push esi
push edi
xor edi, edi
push edi
push 0x80
push 3
pop esi
push esi
push edi
push 1
mov dword [ebp], edi
mov edx, dword [eax]
mov eax, dword [eax + 4]
push 0x80000000
push ecx
mov dword [esp + 0x30], edx
mov dword [esp + 0x58], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x42043c
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
mov edi, eax
lea eax, [esp + 0x30]
push eax
push 0x10
lea eax, [esp + 0x4c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [esp + 0x44]
xor dword [eax], 0x12345678
lea eax, [eax + 4]
dec esi
jne 0x42029f
sub edi, dword [esp + 0x48]
movzx esi, word [esp + 0x46]
push edi
mov dword [esp + 0x20], esi
mov dword [esp + 0x14], edi
call fcn.00407458
pop ecx
push 0
push 0
push dword [esp + 0x50]
mov edi, eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [esp + 0x30]
push eax
push dword [esp + 0x18]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
imul esi, esi, 0xc
push esi
call fcn.00407458
push esi
push eax
push dword [esp + 0x1c]
mov dword [esp + 0x30], eax
push edi
call fcn.0042045f
push edi
call fcn.0040746c
mov eax, dword [esp + 0x38]
add esp, 0x18
mov edx, dword [esp + 0x1c]
mov ecx, eax
xor esi, esi
mov dword [esp + 0x10], ecx
lea edi, [eax + edx*8]
mov dword [esp + 0x18], edi
test edx, edx
je 0x42042e
mov eax, dword [esp + 0x14]
cmp dword [ecx], eax
jne 0x42041a
mov edi, dword [esp + 0x3c]
cmp dword [ecx + 4], edi
mov edi, dword [esp + 0x18]
jne 0x42041a
mov ecx, dword [edi + esi*4]
lea eax, [edx - 1]
cmp esi, eax
mov dword [esp + 0x34], ecx
mov eax, dword [esp + 0x4c]
je 0x42035b
mov eax, dword [edi + esi*4 + 4]
sub eax, ecx
mov dword [ebp], eax
mov eax, dword [esp + 0x48]
add eax, 0xfffffff0
push eax
mov dword [esp + 0x28], eax
call fcn.00407458
mov edi, eax
mov dword [esp + 0x34], edi
pop ecx
test edi, edi
je 0x42040e
push 0
push 0
push 0x10
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [esp + 0x30]
push eax
push dword [esp + 0x2c]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp]
xor edi, edi
add eax, dword [esp + 0x34]
push eax
mov dword [esp + 0x3c], eax
call fcn.00407458
mov dword [esp + 0x2c], eax
pop ecx
test eax, eax
je 0x420400
push dword [esp + 0x38]
push eax
push dword [esp + 0x2c]
push dword [esp + 0x3c]
call fcn.0042045f
add esp, 0x10
cmp eax, dword [esp + 0x38]
jne 0x4203f6
push dword [ebp]
call fcn.00407458
push dword [ebp]
mov ecx, dword [esp + 0x30]
mov edi, eax
add ecx, dword [esp + 0x3c]
push ecx
push edi
call fcn.004b91d0
add esp, 0x10
push dword [esp + 0x28]
call fcn.0040746c
pop ecx
push dword [esp + 0x30]
call fcn.0040746c
pop ecx
test edi, edi
jne 0x420451
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
add ecx, 8
inc esi
mov dword [esp + 0x10], ecx
cmp esi, edx
jb 0x42032c
mov eax, dword [esp + 0x20]
push eax
call fcn.0040746c
pop ecx
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [esp + 0x50]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004b35e5
add esp, 0x44
ret
push dword [esp + 0x20]
call fcn.0040746c
pop ecx
mov eax, edi
jmp 0x42043e