Function at 0x1085813
Capabilities:
Copy file

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xe6c
mov eax, dword [0x1099a38]
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ebp + 0xc]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0xe3c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0xe44], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0xe48], eax
mov eax, 0x3ff
sub eax, ecx
push ebx
xor ebx, ebx
cmp dword [ebp + 0x18], 0x400
mov dword [ebp - 0xe38], ebx
mov dword [ebp - 0xe2c], ebx
mov dword [ebp - 0xe34], 1
mov dword [ebp - 0xe24], eax
mov dword [ebp - 0xe30], eax
mov dword [ebp - 0xe20], ecx
mov dword [ebp - 0xe28], ecx
jb 0x1085cda
push esi
push edi
xor eax, eax
mov esi, 0x100
mov ecx, esi
lea edi, [ebp - 0xa1c]
rep stosd dword es:[edi], eax
mov ecx, esi
lea edi, [ebp - 0xe1c]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0xe38]
push eax
mov edi, 0x104
push edi
lea eax, [ebp - 0x61c]
push eax
push 0x102ad40
push edx
push dword [ebp - 0xe3c]
push ebx
call dword [sym.imp.UPDSPAPI.dll_UpdSpGetLineTextA]
test eax, eax
je 0x1085cd8
lea eax, [ebp - 0xe6c]
push eax
push ebx
lea eax, [ebp - 0x61c]
push eax
push dword [ebp - 0xe3c]
call dword [sym.imp.UPDSPAPI.dll_UpdSpFindFirstLineA]
test eax, eax
je 0x1085c46
mov esi, 0x100bc20
lea eax, [ebp - 0xe6c]
push eax
call dword [sym.imp.UPDSPAPI.dll_UpdSpGetFieldCount]
mov dword [ebp - 0xe40], eax
xor eax, eax
cmp dword [ebp - 0xe40], ebx
jle 0x1085c30
lea ecx, [ebp - 0xe38]
push ecx
push edi
inc eax
lea ecx, [ebp - 0x414]
push ecx
push eax
mov dword [ebp - 0xe4c], eax
lea eax, [ebp - 0xe6c]
push eax
call dword [sym.imp.UPDSPAPI.dll_UpdSpGetStringFieldA]
test eax, eax
je 0x1085c1e
lea eax, [ebp - 0xe38]
push eax
push edi
lea eax, [ebp - 0x518]
push eax
lea eax, [ebp - 0x414]
push eax
push ebx
push dword [ebp - 0xe3c]
call dword [sym.imp.UPDSPAPI.dll_UpdSpGetTargetPathA]
test eax, eax
je 0x1085c1e
lea eax, [ebp - 0xe5c]
push eax
push ebx
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0xe3c]
call dword [sym.imp.UPDSPAPI.dll_UpdSpFindFirstLineA]
test eax, eax
je 0x1085c1e
lea eax, [ebp - 0xe38]
push eax
jmp 0x1085bf1
mov eax, dword [ebp - 0xe24]
sub eax, dword [ebp - 0xe20]
mov ecx, dword [ebp - 0xe28]
sub dword [ebp - 0xe30], ecx
cmp eax, 1
mov dword [ebp - 0xe24], eax
jle 0x1085c13
lea eax, [ebp - 0x310]
push eax
lea eax, [ebp - 0x518]
push eax
push 0x1020a90
lea eax, [ebp - 0x108]
push 0x103
push eax
call sub.msvcrt.dll__snprintf
add esp, 0x14
push ebx
push 0x20000000
push 3
push ebx
push ebx
push 0xc0000000
lea eax, [ebp - 0x108]
push eax
mov byte [ebp - 5], bl
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
jne 0x1085b4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
jne 0x1085bb7
cmp dword [0x109ab70], ebx
jne 0x1085a82
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.0108560f
test eax, eax
je 0x1085cd8
push ebx
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x1085a9e
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x108]
push eax
push 0x102ad20
call fcn.01071ac0
add esp, 0xc
jmp 0x1085cd8
lea eax, [ebp - 0x108]
push eax
push esi
lea eax, [ebp - 0x20c]
push 0x103
push eax
call sub.msvcrt.dll__snprintf
add esp, 0x10
cmp dword [ebp - 0xe34], ebx
lea eax, [ebp - 0x20c]
push eax
je 0x1085aee
push esi
push dword [ebp - 0xe24]
lea eax, [ebp - 0xa1c]
push eax
call sub.msvcrt.dll__snprintf
mov dword [ebp - 0xe20], eax
lea eax, [ebp - 0x20c]
push eax
push esi
push dword [ebp - 0xe30]
lea eax, [ebp - 0xe1c]
push eax
call sub.msvcrt.dll__snprintf
add esp, 0x20
mov dword [ebp - 0xe28], eax
jmp 0x1085b81
mov eax, dword [ebp - 0xe20]
push 0x102ad1c
push 0x100a244
push dword [ebp - 0xe24]
lea eax, [ebp + eax - 0xa1c]
push eax
call sub.msvcrt.dll__snprintf
add dword [ebp - 0xe20], eax
lea eax, [ebp - 0x20c]
push eax
mov eax, dword [ebp - 0xe28]
push 0x102ad1c
push 0x100a244
push dword [ebp - 0xe30]
lea eax, [ebp + eax - 0xa1c]
push eax
call sub.msvcrt.dll__snprintf
add esp, 0x28
add dword [ebp - 0xe28], eax
jmp 0x1085bde
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0xe34], ebx
lea eax, [ebp - 0x108]
push eax
je 0x1085b89
push esi
push dword [ebp - 0xe24]
lea eax, [ebp - 0xa1c]
push eax
call sub.msvcrt.dll__snprintf
add esp, 0x10
mov dword [ebp - 0xe20], eax
mov dword [ebp - 0xe34], ebx
jmp 0x1085bde
mov eax, dword [ebp - 0xe20]
push 0x102ad1c
push 0x100a244
push dword [ebp - 0xe24]
lea eax, [ebp + eax - 0xa1c]
push eax
call sub.msvcrt.dll__snprintf
add esp, 0x14
add dword [ebp - 0xe20], eax
jmp 0x1085bde
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
je 0x1085bcb
cmp eax, 2
jne 0x1085c84
lea eax, [ebp - 0x108]
push eax
push 0x102ad00
call fcn.01071ac0
pop ecx
pop ecx
lea eax, [ebp - 0xe5c]
push eax
push eax
call dword [sym.imp.UPDSPAPI.dll_UpdSpFindNextLine]
test eax, eax
je 0x1085c1e
push ebx
push edi
lea eax, [ebp - 0x310]
push eax
push ebx
push ebx
lea eax, [ebp - 0xe5c]
push ebx
push eax
call dword [sym.imp.UPDSPAPI.dll_UpdSpGetLineTextA]
test eax, eax
jne 0x10859a7
jmp 0x1085c1e
push 0x102acd4
call fcn.01071ac0
pop ecx
mov eax, dword [ebp - 0xe4c]
cmp eax, dword [ebp - 0xe40]
jl 0x1085921
lea eax, [ebp - 0xe6c]
push eax
push eax
call dword [sym.imp.UPDSPAPI.dll_UpdSpFindNextLine]
test eax, eax
jne 0x1085900
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, 0x400
push esi
push dword [ebp - 0xe44]
lea eax, [ebp - 0xa1c]
push 0xffffffffffffffff
push eax
push ebx
push ebx
call edi
test eax, eax
jne 0x1085c92
lea eax, [ebp - 0xa1c]
push eax
mov dword [ebp - 0xe2c], ebx
push 0x102ac6c
call fcn.01071ac0
pop ecx
pop ecx
jmp 0x1085cd8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x102aca4
jmp 0x1085c7b
cmp byte [ebp - 0xe1c], 0x30
je 0x1085cce
push esi
push dword [ebp - 0xe48]
lea eax, [ebp - 0xe1c]
push 0xffffffffffffffff
push eax
push ebx
push ebx
call edi
test eax, eax
jne 0x1085cce
lea eax, [ebp - 0xe1c]
push eax
push 0x102ac6c
call fcn.01071ac0
pop ecx
pop ecx
mov dword [ebp - 0xe2c], ebx
jmp 0x1085cd8
mov dword [ebp - 0xe2c], 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xe2c]
pop ebx
call fcn.0106bc50
leave
ret 0x18