Function at 0x401000
Capabilities:
Copy file

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x411d18
push eax
mov dword fs:[0], esp
sub esp, 8
push ebx
mov ebx, dword [esp + 0x1c]
push 0
push ebx
call fcn.0040966b
add esp, 8
cmp eax, 0xffffffff
jne 0x401042
mov eax, 1
pop ebx
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
add esp, 0x14
ret
mov eax, dword [0x415040]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
test ebx, ebx
push edi
mov dword [esp + 0x14], eax
je 0x4010a6
mov ecx, ebx
shr ecx, 0x10
jne 0x401072
mov eax, ebx
lea ecx, [esp + 0x14]
and eax, 0xffff
push eax
call fcn.004017f0
jmp 0x4010a6
push ebx
call ebp
mov esi, eax
test esi, esi
je 0x4010a6
push esi
lea ecx, [esp + 0x18]
call fcn.00401a50
test eax, eax
je 0x4010a6
lea edx, [esi + 1]
cmp edx, esi
jb 0x4010a6
mov edi, dword [esp + 0x14]
mov ecx, esi
mov eax, ecx
mov esi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x415040]
mov edx, 0x4183cc
test edx, edx
mov dword [esp + 0x20], 0
mov dword [esp + 0x28], ecx
je 0x401116
mov eax, edx
shr eax, 0x10
jne 0x4010db
xor eax, eax
mov ecx, edx
mov ax, cx
lea ecx, [esp + 0x28]
push eax
call fcn.004017f0
jmp 0x401116
push 0x4183cc
call ebp
mov esi, eax
test esi, esi
je 0x401116
push esi
lea ecx, [esp + 0x2c]
call fcn.00401a50
test eax, eax
je 0x401116
lea edx, [esi + 1]
cmp edx, esi
jb 0x401116
mov edi, dword [esp + 0x28]
mov ecx, esi
mov eax, ecx
mov esi, 0x4183cc
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x415040]
mov edx, 0x4183cc
test edx, edx
mov byte [esp + 0x20], 1
mov dword [esp + 0x10], ecx
je 0x401183
mov eax, edx
shr eax, 0x10
jne 0x401148
xor eax, eax
mov ecx, edx
mov ax, cx
lea ecx, [esp + 0x10]
push eax
call fcn.004017f0
jmp 0x401183
push 0x4183cc
call ebp
mov esi, eax
test esi, esi
je 0x401183
push esi
lea ecx, [esp + 0x14]
call fcn.00401a50
test eax, eax
je 0x401183
lea edx, [esi + 1]
cmp edx, esi
jb 0x401183
mov edi, dword [esp + 0x10]
mov ecx, esi
mov eax, ecx
mov esi, 0x4183cc
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ebp, dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov byte [esp + 0x20], 2
xor edi, edi
mov esi, 1
push esi
lea ecx, [esp + 0x14]
push str.._04d
push ecx
call fcn.004012b0
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x20]
add esp, 0xc
cmp eax, ecx
je 0x4011f6
mov edx, dword [eax - 0xc]
test edx, edx
jge 0x4011c8
mov edx, dword [0x415044]
add eax, 0xfffffff4
cmp eax, edx
jne 0x4011cf
mov eax, dword [ecx - 0xc]
test eax, eax
jge 0x4011df
mov edx, dword [ecx - 8]
push ecx
push edx
lea ecx, [esp + 0x30]
call fcn.00401ab0
jmp 0x4011f6
lea ecx, [esp + 0x28]
call fcn.00401c70
mov eax, dword [esp + 0x14]
mov dword [esp + 0x28], eax
add eax, 0xfffffff4
push eax
call ebp
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x28]
push eax
mov eax, dword [eax - 8]
push eax
call fcn.00401b70
mov ecx, dword [esp + 0x28]
push 0
push ecx
call fcn.0040966b
add esp, 8
cmp eax, 0xffffffff
je 0x40122b
inc esi
cmp esi, 0x270f
jle 0x401195
jmp 0x40123b
mov edx, dword [esp + 0x28]
push 1
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov edi, eax
mov eax, dword [esp + 0x10]
mov edx, dword [0x415044]
mov byte [esp + 0x20], 1
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40126f
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40126f
mov edx, dword [esp + 0x10]
lea eax, [edx - 0xc]
push eax
call fcn.00409660
add esp, 4
lea ecx, [esp + 0x28]
mov byte [esp + 0x20], 0
call fcn.00401a20
lea ecx, [esp + 0x14]
mov dword [esp + 0x20], 0xffffffff
call fcn.00401a20
mov ecx, dword [esp + 0x18]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x14
ret