Function at 0x101795e9
Capabilities:
Clear file content
Get common file path

Disassembly:
push ebp
sub esp, 0x13c
lea ebp, [esp - 4]
mov eax, dword [0x101cd7b4]
xor eax, ebp
mov dword [ebp + 0x13c], eax
push 0x34
mov eax, 0x10197ac5
call fcn.1015e3cb
mov ebx, dword [ebp + 0x150]
mov esi, dword [ebp + 0x154]
push ebx
mov edi, ecx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x24], esi
call fcn.101790a1
cmp eax, dword [ebp + 0x148]
jne 0x1017963b
cmp edx, dword [ebp + 0x14c]
je 0x1017983d
mov eax, dword [edi + 0x28]
cmp eax, dword [0x101cec4c]
jne 0x10179653
mov dword [ebx], 5
xor al, al
jmp 0x1017983f
push ebx
mov ecx, edi
call fcn.1017916d
cmp eax, dword [0x101cec60]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
jne 0x10179671
cmp edx, dword [0x101cec64]
je 0x1017964c
lea eax, [edi + 0x84]
push eax
lea ecx, [ebp - 0x20]
call fcn.10001700
push ebx
push dword [0x101d0268]
mov ecx, edi
push dword [ebp + 0x14c]
push dword [ebp + 0x148]
call fcn.10179108
cmp eax, dword [0x101cec60]
jne 0x101796b4
cmp edx, dword [0x101cec64]
jne 0x101796b4
lea ecx, [ebp - 0x20]
call fcn.10001720
jmp 0x1017964c
push dword [edi + 0x24]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x101796cb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx], eax
jmp 0x101796aa
lea ecx, [ebp - 0x20]
call fcn.10001720
xor ebx, ebx
cmp byte [ebp + 0x158], bl
je 0x101796df
mov byte [esi], bl
push 0xf
pop esi
push ebx
lea ecx, [ebp]
mov dword [ebp + 0x18], esi
call fcn.10002d40
push ebx
lea ecx, [ebp + 0x1c]
mov dword [ebp - 4], ebx
mov dword [ebp + 0x34], esi
call fcn.10002d40
push 0x103
lea eax, [ebp + 0x39]
push ebx
push eax
mov byte [ebp - 4], 1
mov byte [ebp + 0x38], bl
call fcn.101596b0
add esp, 0xc
push 0x104
lea eax, [ebp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [ebp + 0x38]
push eax
lea ecx, [ebp + 0x1c]
call fcn.1002f5d0
mov eax, dword [ebp + 0x30]
dec eax
push eax
lea ecx, [ebp + 0x1c]
call fcn.10025720
cmp byte [eax], 0x5c
je 0x1017976f
push 0x1019a068
lea ecx, [ebp - 0x40]
call fcn.10006620
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp + 0x1c]
mov byte [ebp - 4], 2
call fcn.1000a7c0
push ebx
push 1
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 1
call fcn.10003eb0
push str.kernel32.dll
lea eax, [ebp + 0x1c]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.1002a900
add esp, 0xc
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp]
mov byte [ebp - 4], 3
call fcn.10005470
push ebx
push 1
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 1
call fcn.10003eb0
cmp dword [ebp + 0x18], 0x10
mov eax, dword [ebp + 4]
jae 0x101797af
lea eax, [ebp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
cmp esi, ebx
je 0x101797f6
push str.SetFileValidData
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x101797ef
cmp byte [ebp + 0x158], bl
je 0x101797e9
push dword [ebp + 0x14c]
push dword [ebp + 0x148]
push dword [edi + 0x24]
call eax
test eax, eax
je 0x101797ef
mov eax, dword [ebp - 0x24]
mov byte [eax], 1
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp + 0x14c]
jg 0x10179822
jl 0x1017980e
mov ecx, dword [ebp - 0x18]
cmp ecx, dword [ebp + 0x148]
jae 0x10179822
push dword [ebp - 0x10]
mov ecx, edi
push dword [0x101d0268]
push eax
push dword [ebp - 0x18]
call fcn.10179108
mov eax, dword [ebp - 0x10]
push ebx
push 1
lea ecx, [ebp + 0x1c]
mov dword [eax], ebx
call fcn.10003eb0
push ebx
push 1
lea ecx, [ebp]
call fcn.10003eb0
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x13c]
xor ecx, ebp
call fcn.10159cce
add ebp, 0x140
leave
ret 0x14