Function at 0x401040
Capabilities:
Copy file
Delete file
Extract resource via kernel32 functions
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x42810d
mov eax, dword fs:[0]
push eax
sub esp, 0x77c
mov eax, dword [0x430240]
xor eax, esp
mov dword [esp + 0x778], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x430240]
xor eax, esp
push eax
lea eax, [esp + 0x790]
mov dword fs:[0], eax
mov eax, dword [esp + 0x7a0]
mov edi, ecx
push 0xffffffffffffffff
lea ebx, [edi + 4]
push 0
mov ecx, ebx
mov dword [esp + 0x20], edi
call fcn.004030d0
call fcn.0040ecb0
test al, al
je 0x401959
mov eax, dword [edi + 0x18]
lea esi, [eax - 1]
cmp dword [ebx + 0x14], esi
ja 0x4010b3
call fcn.004137a3
cmp dword [ebx + 0x18], 8
jb 0x4010be
mov eax, dword [ebx + 4]
jmp 0x4010c1
lea eax, [ebx + 4]
cmp word [eax + esi*2], 0x5c
je 0x4010d6
push 1
push 0x42af98
mov ecx, ebx
call fcn.00402fd0
push 0x206
lea eax, [esp + 0x58a]
push 0
push eax
mov word [esp + 0x590], 0
call fcn.00415be0
add esp, 0xc
push 0x104
lea ecx, [esp + 0x588]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [esp + 0x584]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
mov dword [edi], eax
je 0x401959
push 0xa
push 0x3e8
push eax
mov byte [esp + 0x22], 0
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
je 0x40163d
mov eax, dword [edi]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40163d
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebp, eax
test ebp, ebp
je 0x40163d
mov ecx, dword [edi]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push eax
push ebp
push 0x3e8
mov ecx, edi
call fcn.00401990
test al, al
je 0x40163d
push 0x3e8
lea edi, [esp + 0x24]
call fcn.00401af0
push eax
xor esi, esi
push ebx
lea edi, [esp + 0x98]
mov dword [esp + 0x7a0], esi
call fcn.004037c0
add esp, 8
mov ebp, 8
mov byte [esp + 0x798], 2
cmp dword [esp + 0x38], ebp
jb 0x4011cc
mov edx, dword [esp + 0x24]
push edx
call fcn.00413bbf
add esp, 4
push 0x206
lea eax, [esp + 0x17a]
push esi
push eax
mov dword [esp + 0x44], 7
mov dword [esp + 0x40], esi
mov word [esp + 0x30], si
mov word [esp + 0x180], si
call fcn.00415be0
mov eax, dword [esp + 0xa0]
add esp, 0xc
cmp dword [esp + 0xa8], ebp
jae 0x401212
lea eax, [esp + 0x94]
push eax
push 0x104
lea ecx, [esp + 0x17c]
push ecx
push esi
push 0x42af9c
push str.game
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [esp + 0x174]
lea edx, [eax + 2]
jmp 0x401240
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x401240
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0x178]
push edx
mov ecx, ebx
call fcn.00402fd0
push 1
push 0x42af98
mov ecx, ebx
call fcn.00402fd0
call fcn.0040ecb0
test al, al
jne 0x401292
lea esi, [esp + 0x90]
mov dword [esp + 0x798], 0xffffffff
call fcn.00404b40
jmp 0x40163d
push 0x3e8
lea edi, [esp + 0x78]
call fcn.00401af0
push eax
push ebx
lea edi, [esp + 0xd0]
mov byte [esp + 0x7a0], 3
call fcn.004037c0
add esp, 8
mov byte [esp + 0x798], 5
cmp dword [esp + 0x8c], ebp
jb 0x4012d7
mov eax, dword [esp + 0x78]
push eax
call fcn.00413bbf
add esp, 4
mov eax, dword [esp + 0xcc]
xor ebp, ebp
mov edi, 8
cmp dword [esp + 0xe0], edi
mov dword [esp + 0x8c], 7
mov dword [esp + 0x88], ebp
mov word [esp + 0x78], bp
jae 0x40130c
lea eax, [esp + 0xcc]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push eax
call esi
cmp dword [esp + 0xe0], edi
mov ecx, dword [esp + 0xcc]
jae 0x40132c
lea ecx, [esp + 0xcc]
cmp dword [esp + 0xa8], edi
mov eax, dword [esp + 0x94]
jae 0x401343
lea eax, [esp + 0x94]
push ebp
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
cmp dword [esp + 0xa8], edi
mov eax, dword [esp + 0x94]
jae 0x401363
lea eax, [esp + 0x94]
push eax
call esi
mov edi, dword [esp + 0x18]
mov ecx, dword [edi]
push 0xa
push 0x3e9
push ecx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
cmp esi, ebp
je 0x4013bd
mov edx, dword [edi]
push esi
push edx
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebp
je 0x4013bd
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
cmp eax, ebp
mov dword [esp + 0x1c], eax
je 0x4013bd
mov eax, dword [edi]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x1c]
push eax
push ecx
push 0x3e9
mov ecx, edi
call fcn.00401990
test al, al
jne 0x4013ce
lea esi, [esp + 0xc8]
call fcn.00404b40
jmp 0x401276
mov edx, dword [edi]
push 0xa
push 0x3ea
push edx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
cmp esi, ebp
je 0x401421
mov eax, dword [edi]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebp
je 0x401421
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
cmp eax, ebp
mov dword [esp + 0x1c], eax
je 0x401421
mov ecx, dword [edi]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edx, dword [esp + 0x1c]
push eax
push edx
push 0x3ea
mov ecx, edi
call fcn.00401990
test al, al
jne 0x401432
lea esi, [esp + 0xc8]
call fcn.00404b40
jmp 0x401276
lea eax, [esp + 0x138]
push eax
call fcn.0040d350
mov byte [esp + 0x798], 6
push 7
push str.res.zip
lea esi, [esp + 0x60]
mov dword [esp + 0x78], 7
mov dword [esp + 0x74], ebp
mov word [esp + 0x64], bp
call fcn.00403260
mov ecx, esi
push ecx
push ebx
lea edi, [esp + 0xec]
mov byte [esp + 0x7a0], 7
call fcn.004037c0
add esp, 8
mov byte [esp + 0x798], 9
cmp dword [esp + 0x70], 8
jb 0x40149f
mov edx, dword [esp + 0x5c]
push edx
call fcn.00413bbf
add esp, 4
mov eax, 7
push 3
push 0x42afc4
lea esi, [esp + 0x28]
mov dword [esp + 0x78], eax
mov dword [esp + 0x74], ebp
mov word [esp + 0x64], bp
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], ebp
mov word [esp + 0x2c], bp
call fcn.00403260
mov eax, esi
push eax
push ebx
lea edi, [esp + 0x44]
mov byte [esp + 0x7a0], 0xa
call fcn.004037c0
add esp, 8
lea ecx, [esp + 0xe4]
push ecx
lea edx, [esp + 0x13c]
push edx
mov ecx, eax
mov byte [esp + 0x7a0], 0xb
call fcn.0040d520
test al, al
sete byte [esp + 0x17]
cmp dword [esp + 0x54], 8
jb 0x401520
mov eax, dword [esp + 0x40]
push eax
call fcn.00413bbf
add esp, 4
mov esi, 8
cmp dword [esp + 0x38], esi
mov edi, 7
mov dword [esp + 0x54], edi
mov dword [esp + 0x50], ebp
mov word [esp + 0x40], bp
jb 0x40154a
mov ecx, dword [esp + 0x24]
push ecx
call fcn.00413bbf
add esp, 4
cmp byte [esp + 0x17], 0
je 0x401583
lea esi, [esp + 0xe4]
call fcn.00404b40
lea edx, [esp + 0x138]
push edx
mov byte [esp + 0x79c], 5
call fcn.0040d430
lea esi, [esp + 0xc8]
call fcn.00404b40
jmp 0x401276
cmp dword [esp + 0xfc], esi
mov eax, dword [esp + 0xe8]
jae 0x40159a
lea eax, [esp + 0xe8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [esp + 0xfc], esi
mov byte [esp + 0x16], 1
jb 0x4015bf
mov eax, dword [esp + 0xe8]
push eax
call fcn.00413bbf
add esp, 4
lea ecx, [esp + 0x138]
push ecx
mov dword [esp + 0x100], edi
mov dword [esp + 0xfc], ebp
mov word [esp + 0xec], bp
mov byte [esp + 0x79c], 5
call fcn.0040d430
cmp dword [esp + 0xe0], esi
jb 0x401603
mov edx, dword [esp + 0xcc]
push edx
call fcn.00413bbf
add esp, 4
mov dword [esp + 0x798], 0xffffffff
cmp dword [esp + 0xa8], esi
mov dword [esp + 0xe0], edi
mov dword [esp + 0xdc], ebp
mov word [esp + 0xcc], bp
jb 0x40163d
mov eax, dword [esp + 0x94]
push eax
call fcn.00413bbf
add esp, 4
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp byte [esp + 0x16], 0
je 0x401959
mov edx, str.setting.ini
lea eax, [esp + 0x3c]
call fcn.00402d70
push eax
push ebx
lea edi, [esp + 0x124]
mov dword [esp + 0x7a0], 0xc
call fcn.004037c0
add esp, 8
mov ebp, 8
mov byte [esp + 0x798], 0xe
cmp dword [esp + 0x54], ebp
jb 0x40169f
mov eax, dword [esp + 0x40]
push eax
call fcn.00413bbf
add esp, 4
xor eax, eax
mov dword [esp + 0x50], eax
mov word [esp + 0x40], ax
mov esi, 7
mov edx, str.temp.exe
lea eax, [esp + 0x74]
mov dword [esp + 0x54], esi
call fcn.00402d70
push eax
push ebx
lea edi, [esp + 0x108]
mov byte [esp + 0x7a0], 0xf
call fcn.004037c0
add esp, 8
mov byte [esp + 0x798], 0x11
cmp dword [esp + 0x8c], ebp
jb 0x4016f8
mov ecx, dword [esp + 0x78]
push ecx
call fcn.00413bbf
add esp, 4
mov dword [esp + 0x8c], esi
xor esi, esi
push 0x206
lea edx, [esp + 0x382]
push esi
push edx
mov dword [esp + 0x94], esi
mov word [esp + 0x84], si
mov word [esp + 0x388], si
call fcn.00415be0
mov eax, dword [esp + 0x12c]
add esp, 0xc
cmp dword [esp + 0x134], ebp
jae 0x401745
lea eax, [esp + 0x120]
push eax
push 0x104
lea eax, [esp + 0x384]
push eax
push esi
push 0x42af9c
push str.game
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea edx, [esp + 0x37c]
lea eax, [esp + 0x20]
call fcn.00402d70
push eax
push ebx
lea edi, [esp + 0x44]
mov byte [esp + 0x7a0], 0x12
call fcn.004037c0
push eax
mov ebx, str..exe
lea esi, [esp + 0xb8]
mov byte [esp + 0x7a4], 0x13
call fcn.00403870
add esp, 0xc
cmp dword [esp + 0x54], ebp
jb 0x4017b7
mov ecx, dword [esp + 0x40]
push ecx
call fcn.00413bbf
add esp, 4
xor ebx, ebx
mov edi, 7
mov dword [esp + 0x54], edi
mov dword [esp + 0x50], ebx
mov word [esp + 0x40], bx
mov byte [esp + 0x798], 0x16
cmp dword [esp + 0x38], ebp
jb 0x4017e6
mov edx, dword [esp + 0x24]
push edx
call fcn.00413bbf
add esp, 4
cmp dword [esp + 0xc4], ebp
mov eax, dword [esp + 0xb0]
mov dword [esp + 0x38], edi
mov dword [esp + 0x34], ebx
mov word [esp + 0x24], bx
jae 0x40180a
lea eax, [esp + 0xb0]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push eax
call esi
lea eax, [esp + 0xac]
lea ecx, [esp + 0x100]
call fcn.0040ec60
cmp dword [esp + 0x118], ebp
mov eax, dword [esp + 0x104]
jae 0x40183d
lea eax, [esp + 0x104]
push eax
call esi
lea edx, [esp + 0x37c]
lea eax, [esp + 0x74]
call fcn.00402d70
lea ecx, [esp + 0xac]
push ecx
mov ecx, eax
mov byte [esp + 0x79c], 0x17
call fcn.00401c40
mov byte [esp + 0x798], 0x16
cmp dword [esp + 0x8c], ebp
jb 0x401885
mov edx, dword [esp + 0x78]
push edx
call fcn.00413bbf
add esp, 4
cmp byte [esp + 0x7a4], bl
jne 0x4018d9
lea ecx, [esp + 0xac]
lea esi, [esp + 0x74]
call fcn.00408b50
cmp dword [esp + 0x8c], ebp
mov ecx, dword [esp + 0x78]
jae 0x4018af
lea ecx, [esp + 0x78]
cmp dword [esp + 0xc4], ebp
mov eax, dword [esp + 0xb0]
jae 0x4018c6
lea eax, [esp + 0xb0]
push ecx
push eax
call fcn.00404c80
add esp, 8
lea esi, [esp + 0x74]
call fcn.00404b40
mov ecx, dword [esp + 0x18]
call fcn.00402060
cmp dword [esp + 0xc4], ebp
jb 0x4018fb
mov eax, dword [esp + 0xb0]
push eax
call fcn.00413bbf
add esp, 4
cmp dword [esp + 0x118], ebp
mov dword [esp + 0xc4], edi
mov dword [esp + 0xc0], ebx
mov word [esp + 0xb0], bx
jb 0x40192a
mov ecx, dword [esp + 0x104]
push ecx
call fcn.00413bbf
add esp, 4
cmp dword [esp + 0x134], ebp
mov dword [esp + 0x118], edi
mov dword [esp + 0x114], ebx
mov word [esp + 0x104], bx
jb 0x401959
mov edx, dword [esp + 0x120]
push edx
call fcn.00413bbf
add esp, 4
mov ecx, dword [esp + 0x790]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x778]
xor ecx, esp
call fcn.004138c3
add esp, 0x788
ret 8