Function at 0x102271b
Capabilities:
Copy file

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xe6c
mov eax, dword [0x102c22c]
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 0x1022be2
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 0x10090fc
push edx
push dword [ebp - 0xe3c]
push ebx
call dword [sym.imp.UPDSPAPI.dll_UpdSpGetLineTextA]
test eax, eax
je 0x1022be0
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 0x1022b4e
mov esi, 0x1001aa4
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 0x1022b38
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 0x1022b26
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 0x1022b26
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 0x1022b26
lea eax, [ebp - 0xe38]
push eax
jmp 0x1022af9
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 0x1022b1b
lea eax, [ebp - 0x310]
push eax
lea eax, [ebp - 0x518]
push eax
push 0x1005404
lea eax, [ebp - 0x108]
push 0x103
push eax
call sub.ntdll.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 0x1022a57
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
jne 0x1022abf
cmp dword [0x102c8d0], ebx
jne 0x102298a
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.0102250d
test eax, eax
je 0x1022be0
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 0x10229a6
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x108]
push eax
push 0x10090dc
call fcn.01015c5a
add esp, 0xc
jmp 0x1022be0
lea eax, [ebp - 0x108]
push eax
push esi
lea eax, [ebp - 0x20c]
push 0x103
push eax
call sub.ntdll.dll__snprintf
add esp, 0x10
cmp dword [ebp - 0xe34], ebx
lea eax, [ebp - 0x20c]
push eax
je 0x10229f6
push esi
push dword [ebp - 0xe24]
lea eax, [ebp - 0xa1c]
push eax
call sub.ntdll.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.ntdll.dll__snprintf
add esp, 0x20
mov dword [ebp - 0xe28], eax
jmp 0x1022a89
mov eax, dword [ebp - 0xe20]
push 0x10090d8
push 0x100560c
push dword [ebp - 0xe24]
lea eax, [ebp + eax - 0xa1c]
push eax
call sub.ntdll.dll__snprintf
add dword [ebp - 0xe20], eax
lea eax, [ebp - 0x20c]
push eax
mov eax, dword [ebp - 0xe28]
push 0x10090d8
push 0x100560c
push dword [ebp - 0xe30]
lea eax, [ebp + eax - 0xa1c]
push eax
call sub.ntdll.dll__snprintf
add esp, 0x28
add dword [ebp - 0xe28], eax
jmp 0x1022ae6
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0xe34], ebx
lea eax, [ebp - 0x108]
push eax
je 0x1022a91
push esi
push dword [ebp - 0xe24]
lea eax, [ebp - 0xa1c]
push eax
call sub.ntdll.dll__snprintf
add esp, 0x10
mov dword [ebp - 0xe20], eax
mov dword [ebp - 0xe34], ebx
jmp 0x1022ae6
mov eax, dword [ebp - 0xe20]
push 0x10090d8
push 0x100560c
push dword [ebp - 0xe24]
lea eax, [ebp + eax - 0xa1c]
push eax
call sub.ntdll.dll__snprintf
add esp, 0x14
add dword [ebp - 0xe20], eax
jmp 0x1022ae6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
je 0x1022ad3
cmp eax, 2
jne 0x1022b8c
lea eax, [ebp - 0x108]
push eax
push 0x10090bc
call fcn.01015c5a
pop ecx
pop ecx
lea eax, [ebp - 0xe5c]
push eax
push eax
call dword [sym.imp.UPDSPAPI.dll_UpdSpFindNextLine]
test eax, eax
je 0x1022b26
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 0x10228af
jmp 0x1022b26
push 0x1009090
call fcn.01015c5a
pop ecx
mov eax, dword [ebp - 0xe4c]
cmp eax, dword [ebp - 0xe40]
jl 0x1022829
lea eax, [ebp - 0xe6c]
push eax
push eax
call dword [sym.imp.UPDSPAPI.dll_UpdSpFindNextLine]
test eax, eax
jne 0x1022808
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 0x1022b9a
lea eax, [ebp - 0xa1c]
push eax
mov dword [ebp - 0xe2c], ebx
jmp 0x109da90
call fcn.01015c5a
pop ecx
pop ecx
jmp 0x1022be0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1009060
jmp 0x1022b83
cmp byte [ebp - 0xe1c], 0x30
je 0x1022bd6
push esi
push dword [ebp - 0xe48]
lea eax, [ebp - 0xe1c]
push 0xffffffffffffffff
push eax
push ebx
push ebx
call edi
test eax, eax
jne 0x1022bd6
lea eax, [ebp - 0xe1c]
push eax
push 0x1009028
call fcn.01015c5a
pop ecx
pop ecx
mov dword [ebp - 0xe2c], ebx
jmp 0x1022be0
mov dword [ebp - 0xe2c], 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xe2c]
pop ebx
call fcn.0101439a
leave
ret 0x18