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

Disassembly:
sub esp, 0x76c
mov eax, dword [0x42610c]
xor eax, esp
mov dword [esp + 0x768], eax
push ebx
mov ebx, dword [esp + 0x774]
push ebp
mov ebp, dword [esp + 0x780]
push esi
mov esi, dword [esp + 0x780]
push edi
mov edi, dword [esp + 0x798]
push 0x5c
push esi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x24], ebp
mov dword [0x42808c], edi
call fcn.004137d0
add esp, 8
test eax, eax
jne 0x409050
or edi, 1
push edi
push 0x191
push esi
push 0x7d1
push ebx
call fcn.004062d0
add esp, 0x14
xor eax, eax
jmp 0x409965
push 0x5c
push esi
call fcn.004137d0
inc eax
mov edx, 0x428260
add esp, 8
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x409063
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4090b0
or edi, 3
push edi
push 0x192
push 0x428260
push 0x7d9
push ebx
call fcn.004062d0
add esp, 0x14
xor eax, eax
jmp 0x409965
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
jne 0x4090ec
or edi, 3
push edi
push 0x193
push 0x428260
push 0x7da
push ebx
call fcn.004062d0
add esp, 0x14
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x409965
push eax
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [0x428374], eax
test eax, eax
jne 0x40910f
or edi, 2
push edi
push 0x194
push eax
push 0x7d8
jmp 0x4090d5
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [esp + 0x10], eax
test eax, eax
jne 0x409151
or edi, 2
push edi
push 0x195
push eax
push 0x7d6
push ebx
call fcn.004062d0
mov ecx, dword [0x428374]
add esp, 0x14
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x409965
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
push 0
lea edx, [esp + 0x30]
push edx
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4091b0
or edi, 3
push edi
push 0x196
push 0x428260
push 0x7db
push ebx
call fcn.004062d0
mov edx, dword [0x428374]
add esp, 0x14
push edx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [0x428374]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x409965
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
push ecx
push str.I78j6f_OP0
push edx
call fcn.00402ef0
add esp, 0xc
cmp eax, 0xffffffff
jne 0x40920c
or edi, 1
push edi
push 0x1e5
push 0x428260
push 0x42
push ebx
call fcn.004062d0
mov eax, dword [0x428374]
add esp, 0x14
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov ecx, dword [0x428374]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x409965
mov edx, dword [esp + 0x10]
mov ecx, dword [eax + edx - 0x182]
lea eax, [eax + edx - 0x182]
add ecx, eax
mov dword [esp + 0x20], eax
lea eax, [esp + 0x46c]
push eax
mov dword [esp + 0x28], ecx
lea ecx, [esp + 0x36c]
push ecx
lea edx, [esp + 0x578]
push edx
lea eax, [esp + 0x680]
push eax
push ebp
call fcn.00413268
add esp, 0x14
cmp byte [esp + 0x368], 0
jne 0x409294
or edi, 1
push edi
push 0x1bc
push ebp
push 0x7d1
push ebx
call fcn.004062d0
mov ecx, dword [0x428374]
add esp, 0x14
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov edx, dword [0x428374]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x409965
mov eax, dword [esp + 0x794]
cmp byte [eax], 0
je 0x4092bc
lea edx, [esp + 0x160]
sub edx, eax
lea esp, [esp]
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x4092b0
jmp 0x409332
xor eax, eax
mov edi, edi
mov cl, byte [esp + eax + 0x368]
mov byte [esp + eax + 0x160], cl
inc eax
test cl, cl
jne 0x4092c0
lea eax, [esp + 0x46c]
mov edx, eax
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4092e0
lea edi, [esp + 0x160]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4092f1
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
cmp byte [0x428e20], 0
rep movsb byte es:[edi], byte [esi]
je 0x409332
xor eax, eax
jmp 0x409320
mov cl, byte [eax + 0x428e20]
mov byte [esp + eax + 0x160], cl
inc eax
test cl, cl
jne 0x409320
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x790]
mov ecx, edi
sub ecx, ebx
mov eax, ebx
lea edx, [ecx + 0x1c5]
lea esp, [esp]
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x409350
mov ebp, dword [esp + 0x78c]
mov edx, edi
sub edx, ebp
mov eax, ebp
add edx, 0x1cc
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x409370
lea eax, [esp + 0x160]
mov edx, eax
mov ecx, edi
sub ecx, edx
lea edx, [ecx + 0x1dd]
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x409390
mov esi, dword [esp + 0x24]
mov ecx, esi
sub ecx, ebx
mov eax, ebx
lea edx, [ecx + 4]
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x4093a7
mov edx, esi
sub edx, ebp
mov eax, ebp
add edx, 0xb
lea ebx, [ebx]
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x4093c0
lea eax, [esp + 0x160]
mov ecx, eax
sub esi, ecx
lea edx, [esi + 0x1c]
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x4093d8
mov eax, dword [edi + 0x14]
and eax, 0xfffffff7
or eax, 0x20
mov dword [edi + 0x14], eax
cmp dword [0x42745c], 0
je 0x4093ff
or eax, 0x4000000
mov dword [edi + 0x14], eax
push edi
call fcn.00404b20
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
push edx
push str.mdk2_t9Enx
push eax
call fcn.00402ef0
add esp, 0x10
cmp eax, 0xffffffff
je 0x4097ea
mov ecx, dword [esp + 0x10]
lea esi, [eax + ecx + 0xa]
mov edx, esi
sub edx, ebx
mov eax, ebx
add edx, 0xc
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x409436
mov ecx, esi
sub ecx, ebp
mov eax, ebp
lea edx, [ecx + 0x13]
lea esp, [esp]
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x409450
lea eax, [esp + 0x160]
mov edx, esi
mov ecx, eax
sub edx, ecx
add edx, 0x24
lea ebx, [ebx]
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x409470
mov dword [esi + 8], 1
cmp dword [0x42745c], 0
je 0x409491
mov dword [esi + 8], 0x4000001
xor ebp, ebp
jmp 0x4094a0
mov edx, dword [esp + 0x18]
mov ebx, dword [ebp*4 + section..data]
mov edi, dword [esp + 0x10]
push edx
push ebx
push edi
call fcn.00402ef0
mov esi, eax
add esp, 0xc
cmp esi, 0xffffffff
je 0x409748
mov eax, dword [esp + 0x18]
mov ecx, dword [ebp*4 + 0x42602c]
push eax
push ecx
push edi
call fcn.00402ef0
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
je 0x409708
mov eax, ebx
lea edx, [eax + 1]
jmp 0x4094f0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4094f0
mov ecx, dword [esp + 0x10]
sub eax, edx
add eax, ecx
mov bl, byte [esi + eax]
add esi, eax
add edi, ecx
cmp bl, 2
jbe 0x409550
mov edx, esi
sub edx, ecx
push edx
movzx eax, bl
push eax
push ebp
push 0x602
lea ecx, [esp + 0x70]
push str.__d_01__d__d__08x_
push ecx
call fcn.0041246c
mov edx, dword [esp + 0x7b0]
mov ecx, dword [esp + 0x2c]
or edx, 1
push edx
push 0x602
lea eax, [esp + 0x80]
push eax
push 0x42
push ecx
call fcn.004062d0
add esp, 0x2c
inc esi
cmp esi, edi
jge 0x40957a
movzx ecx, bl
shl ecx, 4
xor eax, eax
lea ecx, [ecx]
mov edx, eax
and edx, 0xf
mov dl, byte [edx + ecx + 0x4260a8]
xor dl, byte [esi]
inc esi
xor dl, 0x29
mov byte [esi - 1], dl
inc eax
cmp esi, edi
jl 0x409560
inc ebp
cmp ebp, 0xb
jb 0x4094a0
test byte [0x429d64], 1
je 0x4097ab
cmp dword [0x429d88], 0
je 0x4097ab
xor ebp, ebp
mov ecx, dword [esp + 0x18]
mov ebx, dword [ebp*4 + 0x4260b0]
mov edx, dword [esp + 0x10]
push ecx
push ebx
push edx
call fcn.00402ef0
mov esi, eax
add esp, 0xc
cmp esi, 0xffffffff
je 0x40979b
mov eax, dword [esp + 0x18]
mov ecx, dword [ebp*4 + 0x4260b4]
mov edx, dword [esp + 0x10]
push eax
push ecx
push edx
call fcn.00402ef0
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
je 0x40978b
mov eax, ebx
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4095f0
mov ecx, dword [esp + 0x10]
sub eax, edx
add eax, ecx
mov bl, byte [esi + eax]
add esi, eax
add edi, ecx
cmp bl, 2
jbe 0x409644
push ebp
push 0x602
lea eax, [esp + 0x68]
push str.__d_04__d_
push eax
call fcn.0041246c
mov ecx, dword [esp + 0x7a8]
mov eax, dword [esp + 0x24]
or ecx, 1
push ecx
push 0x602
lea edx, [esp + 0x78]
push edx
push 0x42
push eax
call fcn.004062d0
add esp, 0x24
inc esi
cmp esi, edi
jge 0x40966b
movzx ecx, bl
shl ecx, 4
xor eax, eax
mov edx, eax
and edx, 0xf
mov dl, byte [edx + ecx + 0x4260a8]
xor dl, byte [esi]
inc esi
xor dl, 0x29
mov byte [esi - 1], dl
inc eax
cmp esi, edi
jl 0x409651
inc ebp
cmp ebp, 1
jb 0x4095a0
cmp dword [0x42745c], 0
je 0x4097ea
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x264]
sub edx, eax
nop
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x409690
lea eax, [esp + 0x264]
push str..cm.net64.dll
push eax
call fcn.00412ff0
mov esi, dword [esp + 0x1c]
add esp, 8
push 0
push str.64_bit_helper
lea ecx, [esp + 0x26c]
push ecx
push esi
mov byte [eax], 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x798]
push edx
push str.DEggz.._r.
push str.__p9835DQB_
push eax
push ecx
lea edx, [esp + 0x278]
push edx
push esi
call fcn.00408e20
add esp, 0x1c
test eax, eax
je 0x4097ea
xor eax, eax
jmp 0x409965
push ebp
push 0x602
push str.__d_03__d_
lea eax, [esp + 0x6c]
push eax
call fcn.0041246c
mov eax, dword [esp + 0x7a8]
mov edx, dword [esp + 0x24]
or eax, 1
push eax
push 0x602
lea ecx, [esp + 0x78]
push ecx
push 0x42
push edx
call fcn.004062d0
add esp, 0x24
xor eax, eax
jmp 0x409965
mov eax, ebx
push eax
push ebp
push 0x602
lea ecx, [esp + 0x6c]
push str.__d_02__d__s_
push ecx
call fcn.0041246c
mov eax, dword [esp + 0x7ac]
or eax, 1
push eax
mov eax, dword [esp + 0x2c]
push 0x602
lea edx, [esp + 0x7c]
push edx
push 0x42
push eax
call fcn.004062d0
add esp, 0x28
xor eax, eax
jmp 0x409965
push ebp
push 0x602
push str.__d_05__d_
jmp 0x409713
push ebp
push 0x602
push str.__d_06__d_
jmp 0x409713
cmp dword [0x42745c], 0
je 0x4097ea
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x798]
push eax
mov eax, dword [esp + 0x20]
push str.DEggz.._s.
push str.QQxddp99__x_
push ecx
mov ecx, dword [esp + 0x24]
push edx
push eax
push ecx
call fcn.00408e20
add esp, 0x1c
test eax, eax
jne 0x409049
mov edi, dword [esp + 0x1c]
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x409851
mov eax, dword [esp + 0x798]
mov edx, dword [esp + 0x14]
or eax, 3
push eax
push 0x1a8
push edi
push 0x7d9
push edx
call fcn.004062d0
mov eax, dword [0x428374]
add esp, 0x14
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov ecx, dword [0x428374]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x409965
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
push 0
lea edx, [esp + 0x2c]
push edx
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4098b7
mov eax, dword [esp + 0x798]
mov edx, dword [esp + 0x14]
or eax, 3
push eax
push 0x1a9
push edi
push 0x7d7
push edx
call fcn.004062d0
mov eax, dword [0x428374]
add esp, 0x14
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov ecx, dword [0x428374]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x409965
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x30
lea edx, [esp + 0x34]
push 0
push edx
call fcn.004122b0
add esp, 0xc
push 0
push 0
lea eax, [esp + 0x38]
push eax
push 0
push edi
call dword [sym.imp.imagehlp.dll_MapAndLoad]
test eax, eax
jne 0x409910
mov eax, dword [esp + 0x798]
mov ecx, dword [esp + 0x14]
or eax, 3
push eax
push 0x1aa
push 0x428260
push 0x7d9
push ecx
call fcn.004062d0
add esp, 0x14
xor eax, eax
jmp 0x409965
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.imagehlp.dll_UnMapAndLoad]
test eax, eax
jne 0x409946
mov eax, dword [esp + 0x798]
or eax, 3
push eax
mov eax, dword [esp + 0x18]
push 0x1ac
push edi
push 0x7d7
push eax
call fcn.004062d0
add esp, 0x14
xor eax, eax
jmp 0x409965
mov ecx, dword [0x428374]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov edx, dword [0x428374]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, 1
mov ecx, dword [esp + 0x778]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00411e16
add esp, 0x76c
ret