Function at 0x409910
Capabilities:
Check if file exists
Copy file
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4792c0
mov eax, dword fs:[0]
push eax
sub esp, 0x268
mov eax, dword [0x499104]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x240], esi
xor ebx, ebx
lea eax, [esi + 0x40]
push ebx
mov dword [ebp - 0x238], ebx
push dword [eax]
mov dword [esi + 0x28], 2
push ebx
mov dword [ebp - 0x264], eax
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
lea ecx, [ebp - 0x225]
call fcn.00408a60
lea ecx, [ebp - 0x225]
mov dword [ebp - 0x224], eax
call fcn.00408360
lea ecx, [ebp - 0x225]
mov dword [ebp - 0x220], eax
call fcn.00408fa0
xor edi, edi
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x230], edi
jmp 0x4099b6
mov esi, dword [ebp - 0x240]
mov eax, dword [0x49bec0]
test al, 1
jne 0x4099d1
or eax, 1
mov dword [0x49bebc], 0
mov dword [0x49bec0], eax
mov byte [ebp - 0x225], 0
lea eax, [ebp - 0x260]
mov dword [ebp - 4], 0
push eax
call fcn.004220bc
lea eax, [ebp - 0x260]
mov dword [ebp - 4], 1
mov dword [ebp - 0x26c], eax
lea eax, [ebp - 0x225]
mov dword [ebp - 0x268], eax
lea eax, [ebp - 0x26c]
push eax
push 0x4049f0
push 0x49bebc
call fcn.004224c4
add esp, 0x10
test eax, eax
je 0x409fb2
lea eax, [ebp - 0x260]
mov dword [ebp - 4], 2
push eax
call fcn.004220cb
push 0x49bec4
add esi, 0x34
mov dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x22c]
push esi
push eax
call fcn.00407470
add esp, 0x10
mov edi, dword [ebp + edi*4 - 0x224]
mov dword [ebp - 4], 5
test edi, edi
jne 0x409a73
xor ecx, ecx
jmp 0x409a8f
mov ecx, edi
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409a80
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x22c]
call fcn.00409850
push edi
push dword [ebp - 0x264]
lea eax, [ebp - 0x23c]
push eax
call fcn.00407470
add esp, 0xc
push dword [ebp - 0x22c]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x409c53
mov eax, dword [esi]
mov ecx, dword [eax - 0x10]
test ecx, ecx
je 0x409ad8
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jne 0x409ae4
call fcn.00403230
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
mov byte [ebp - 4], 8
test eax, eax
je 0x409fed
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
or ebx, 4
mov byte [ebp - 4], 7
mov dword [ebp - 0x234], ebx
mov dword [ebp - 0x238], ebx
lea esi, [eax + 0x10]
mov dword [ebp - 0x24c], esi
test edi, edi
jne 0x409b1b
xor ebx, ebx
jmp 0x409b2f
mov ebx, edi
lea ecx, [ebx + 2]
mov ax, word [ebx]
add ebx, 2
test ax, ax
jne 0x409b20
sub ebx, ecx
sar ebx, 1
mov eax, dword [ebp - 0x240]
mov eax, dword [eax + 0x34]
mov dword [ebp - 0x244], eax
mov edi, dword [eax - 0xc]
mov dword [ebp - 0x248], edi
lea edx, [edi + ebx]
test edx, edx
js 0x409fe3
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x409b75
push edx
lea ecx, [ebp - 0x24c]
call fcn.00403430
mov esi, dword [ebp - 0x24c]
add edi, edi
push edi
push dword [ebp - 0x244]
push edi
push esi
call fcn.00403a80
mov ecx, dword [ebp - 0x230]
lea eax, [ebx + ebx]
push eax
push dword [ebp + ecx*4 - 0x224]
push eax
lea eax, [edi + esi]
push eax
call fcn.00403a80
mov eax, dword [ebp - 0x248]
lea edi, [esi - 0x10]
add eax, ebx
add esp, 0x20
cmp eax, dword [edi + 8]
jg 0x409fe3
xor ecx, ecx
mov dword [edi + 4], eax
mov word [esi + eax*2], cx
mov ebx, dword [ebp - 0x22c]
add ebx, 0xfffffff0
cmp edi, ebx
je 0x409c19
mov eax, dword [ebx + 0xc]
shr eax, 0x1f
test al, al
jne 0x409c0a
mov eax, dword [edi]
cmp eax, dword [ebx]
jne 0x409c0a
push edi
call fcn.00402f10
add esp, 4
lea edx, [ebx + 0xc]
mov esi, eax
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x409bff
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
lea eax, [esi + 0x10]
mov dword [ebp - 0x22c], eax
jmp 0x409c19
push dword [edi + 4]
lea ecx, [ebp - 0x22c]
push esi
call fcn.00403580
mov ebx, dword [ebp - 0x234]
or eax, 0xffffffff
and ebx, 0xfffffffb
mov dword [ebp - 0x238], ebx
mov dword [ebp - 0x244], ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x409c43
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x22c]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x409c74
mov esi, dword [sym.imp.KERNEL32.dll_CopyFileW]
push 0
push dword [ebp - 0x23c]
push dword [ebp - 0x22c]
call esi
mov edi, dword [ebp - 0x230]
jmp 0x409ec2
mov eax, dword [0x49bedc]
test al, 1
jne 0x409c8f
or eax, 1
mov dword [0x49bed8], 0
mov dword [0x49bedc], eax
mov byte [ebp - 0x225], 0
lea eax, [ebp - 0x258]
mov byte [ebp - 4], 9
push eax
call fcn.004220bc
lea eax, [ebp - 0x258]
mov dword [ebp - 0x274], eax
lea eax, [ebp - 0x225]
mov dword [ebp - 0x270], eax
lea eax, [ebp - 0x274]
push eax
push 0x4044b0
push 0x49bed8
call fcn.004224c4
add esp, 0x10
test eax, eax
je 0x409f95
lea eax, [ebp - 0x258]
mov byte [ebp - 4], 0xb
push eax
call fcn.004220cb
add esp, 4
mov edi, dword [ebp - 0x240]
mov eax, dword [edi + 0x34]
mov ecx, dword [eax - 0x10]
test ecx, ecx
je 0x409d0b
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jne 0x409d17
call fcn.00403230
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
mov byte [ebp - 4], 0xf
test eax, eax
je 0x409fed
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
or ebx, 8
mov byte [ebp - 4], 0xe
mov dword [ebp - 0x238], ebx
mov ebx, 0x49bee0
lea esi, [eax + 0x10]
mov dword [ebp - 0x250], esi
lea ecx, [ebx + 2]
nop dword [eax + eax]
mov ax, word [ebx]
add ebx, 2
test ax, ax
jne 0x409d50
mov eax, dword [edi + 0x34]
sub ebx, ecx
sar ebx, 1
mov dword [ebp - 0x234], eax
mov edi, dword [eax - 0xc]
mov dword [ebp - 0x248], edi
lea edx, [ebx + edi]
test edx, edx
js 0x409fe3
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x409d9f
push edx
lea ecx, [ebp - 0x250]
call fcn.00403430
mov esi, dword [ebp - 0x250]
add edi, edi
push edi
push dword [ebp - 0x234]
push edi
push esi
call fcn.00403a80
lea eax, [ebx + ebx]
push eax
push 0x49bee0
push eax
lea eax, [edi + esi]
push eax
call fcn.00403a80
mov eax, dword [ebp - 0x248]
lea edi, [esi - 0x10]
add eax, ebx
add esp, 0x20
cmp eax, dword [edi + 8]
jg 0x409fe3
xor ecx, ecx
mov dword [edi + 4], eax
mov word [esi + eax*2], cx
mov ebx, dword [ebp - 0x22c]
add ebx, 0xfffffff0
cmp edi, ebx
je 0x409e3b
mov eax, dword [ebx + 0xc]
shr eax, 0x1f
test al, al
jne 0x409e2c
mov eax, dword [edi]
cmp eax, dword [ebx]
jne 0x409e2c
push edi
call fcn.00402f10
add esp, 4
lea edx, [ebx + 0xc]
mov esi, eax
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x409e21
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
lea eax, [esi + 0x10]
mov dword [ebp - 0x22c], eax
jmp 0x409e3b
push dword [edi + 4]
lea ecx, [ebp - 0x22c]
push esi
call fcn.00403580
mov ebx, dword [ebp - 0x244]
or eax, 0xffffffff
and ebx, 0xfffffff7
mov byte [ebp - 4], 6
mov dword [ebp - 0x238], ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x409e63
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x230]
mov esi, dword [ebp + edi*4 - 0x224]
test esi, esi
jne 0x409e78
xor ecx, ecx
jmp 0x409e8f
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409e80
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x22c]
call fcn.00409850
push dword [ebp - 0x22c]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov esi, dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x409ec2
push 0
push dword [ebp - 0x23c]
push dword [ebp - 0x22c]
call esi
mov edx, dword [ebp - 0x23c]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x409ee0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x22c]
or eax, 0xffffffff
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x409f05
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
inc edi
mov dword [ebp - 0x230], edi
cmp edi, 3
jb 0x4099b0
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.0044e2e0
mov ebx, dword [ebp - 0x240]
lea eax, [ebp - 0x218]
add esp, 0xc
push dword [ebx + 0x38]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCpyW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea ecx, [ebp - 0x225]
call fcn.00407800
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push 0
lea eax, [ebp - 0x218]
push eax
push dword [ebx + 0x38]
call esi
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042e446
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x258]
mov byte [ebp - 4], 0xc
push eax
call fcn.004220ec
add esp, 4
mov byte [ebp - 4], 0xa
test al, al
je 0x40a00d
jmp 0x409ff7
lea eax, [ebp - 0x260]
mov byte [ebp - 4], 3
push eax
call fcn.004220ec
add esp, 4
mov byte [ebp - 4], 1
test al, al
je 0x40a00d
sub esp, 8
lea eax, [ebp - 0x260]
mov ecx, esp
push eax
call fcn.004028d0
call fcn.00403a30
push 0x80070057
call fcn.00402ca0
push 0x80004005
call fcn.00402ca0
sub esp, 8
lea eax, [ebp - 0x258]
mov ecx, esp
push eax
call fcn.004028d0
call fcn.00403a30
call fcn.00422502
int3