Function at 0x10026fa
Capabilities:
Accept command line arguments
Check if file exists
Copy file
Create process on windows
Get common file path
Get file attributes
Read .ini file
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xacc
push ebx
push esi
push edi
xor ebx, ebx
push 0x40
mov byte [ebp - 0x268], bl
xor eax, eax
pop ecx
lea edi, [ebp - 0x267]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x28], ebx
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov ecx, eax
and ecx, 0xff
cmp ecx, 4
jae 0x1002792
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0x104
lea eax, [ebp - 0x3b0]
push eax
push 3
push ebx
call esi
mov edi, dword [sym.imp.USER32.dll_LoadStringA]
push eax
call edi
push 0x208
lea eax, [ebp - 0x6bc]
push eax
push 1
push ebx
call esi
push eax
call edi
push 0x1010
lea eax, [ebp - 0x6bc]
push eax
lea eax, [ebp - 0x3b0]
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0x47e
jmp 0x100301c
shr eax, 0x1f
mov dword [ebp - 0x34], eax
mov esi, 0x104
push esi
lea eax, [ebp - 0x164]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x10027bc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
jmp 0x100301c
lea eax, [ebp - 0x164]
push eax
call main
cmp eax, ebx
mov dword [ebp - 0x14], eax
jne 0x10027d9
push 0xa1
jmp 0x100301c
cmp dword [ebp - 0x34], ebx
mov dword [ebp - 0x18], 0x1001208
jne 0x10027ec
mov dword [ebp - 0x18], 0x10013c0
mov byte [ebp - 0x4b4], bl
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
lea eax, [eax + eax + 1]
push eax
push ebx
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x10027b0
push eax
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
call fcn.010020c9
cmp dword [ebp - 0x54], ebx
je 0x100285c
call fcn.01001a45
push ebx
jmp 0x100301c
cmp dword [ebp - 0x34], ebx
je 0x1002ac5
push 0x10013b0
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventA]
cmp eax, ebx
mov dword [ebp - 0x1c], eax
je 0x10027b0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0x2c], ebx
jne 0x1002ab9
cmp dword [ebp - 0xc], ebx
jne 0x1002ab9
lea eax, [ebp - 0x164]
push eax
call fcn.01001beb
test eax, eax
je 0x1002ab9
push ebx
push 0x1001d15
push ebx
push 0x65
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.USER32.dll_CreateDialogParamA]
mov dword [ebp - 0x20], eax
push esi
lea eax, [ebp - 0x268]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 0x1001264
lea eax, [ebp - 0x268]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
cmp dword [ebp - 4], ebx
mov eax, dword [ebp - 0x14]
mov byte [eax], bl
je 0x1002929
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x9c8]
push eax
push esi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
je 0x1002929
lea eax, [ebp - 0x9c8]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x1002929
lea eax, [ebp - 0x9c8]
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], ebx
jmp 0x1002932
mov eax, dword [ebp - 4]
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x268]
push eax
lea eax, [ebp - 0x164]
push eax
call fcn.010016d5
cmp eax, ebx
mov ecx, dword [ebp - 0x14]
mov byte [ecx], 0x5c
je 0x1002ab4
lea eax, [ebp - 0x164]
push eax
lea eax, [ebp - 0x8c4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x8c4]
push eax
call main
mov byte [eax], bl
lea eax, [ebp - 0x8c4]
push eax
call main
mov esi, eax
cmp esi, ebx
je 0x100299d
push 0x1001264
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x100299d
mov byte [esi], bl
cmp dword [ebp - 0x24], ebx
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
je 0x1002a31
push dword [ebp - 8]
call esi
cmp eax, ebx
mov dword [ebp - 4], eax
jbe 0x10029bb
inc dword [ebp - 4]
push dword [ebp - 0x10]
call esi
push dword [ebp - 0x24]
add dword [ebp - 4], eax
call esi
mov ecx, dword [ebp - 4]
add ecx, eax
inc ecx
push ecx
push ebx
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x1002a31
mov eax, dword [ebp - 8]
cmp byte [eax], bl
je 0x1002a01
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x1001234
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_lstrcatA]
jmp 0x1002a06
mov eax, dword [ebp - 4]
mov byte [eax], bl
push dword [ebp - 0x10]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push dword [ebp - 0x24]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push dword [ebp - 8]
push ebx
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 4]
mov dword [ebp - 8], eax
push dword [ebp - 8]
call esi
add eax, 8
push eax
push ebx
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
cmp esi, ebx
je 0x1002aac
push 0x10012d0
push dword [ebp - 8]
push 0x10013a8
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x8c4]
push eax
push esi
push dword [ebp - 0x14]
lea eax, [ebp - 0x268]
push eax
call fcn.0100195f
test eax, eax
je 0x10027b0
push 0x2710
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x20], ebx
je 0x1002aa5
push dword [ebp - 0x20]
call dword [sym.imp.USER32.dll_DestroyWindow]
xor eax, eax
jmp 0x10027b6
push 8
pop eax
jmp 0x10027b6
cmp dword [ebp - 0x20], ebx
jne 0x1002ac5
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x1c], ebx
push dword [ebp - 8]
push ebx
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 0x10], ebx
je 0x1002ae4
push dword [ebp - 0x10]
push ebx
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, dword [ebp - 0x30]
cmp edi, ebx
jne 0x1002b9a
cmp dword [ebp - 0xc], ebx
jne 0x1002b9a
mov eax, dword [ebp - 0x3c]
cmp eax, ebx
jne 0x1002b27
cmp dword [ebp - 4], ebx
je 0x1002bb0
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x9c8]
push eax
push esi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
je 0x1002b9a
lea eax, [ebp - 0x9c8]
cmp eax, ebx
mov dword [ebp - 0x10], eax
je 0x1002b9a
push eax
push esi
lea eax, [ebp - 0x6bc]
push eax
push 0x1001302
push 0x1001284
push 0x100139c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push 0x1001398
lea eax, [ebp - 0x6bc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
mov edi, eax
neg edi
sbb edi, edi
inc edi
jne 0x1002b9a
push dword [ebp - 0x10]
lea eax, [ebp - 0x6bc]
push esi
push eax
push 0x1001302
push 0x100127c
push 0x100139c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
je 0x1002b9a
lea eax, [ebp - 0x6bc]
push eax
call fcn.0100182c
mov dword [ebp - 0xc], eax
cmp dword [ebp - 4], ebx
je 0x1002bb0
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 0x44], ebx
mov dword [ebp - 8], ebx
jne 0x1002bd9
cmp edi, ebx
jne 0x1002bd9
cmp dword [ebp - 0xc], ebx
jne 0x1002bd9
push 0x708
call fcn.0100248b
cmp eax, ebx
mov dword [ebp - 0xc], eax
je 0x1002bd9
mov dword [ebp - 8], 1
cmp edi, ebx
mov edi, dword [sym.imp.USER32.dll_LoadStringA]
mov dword [ebp - 4], ebx
jne 0x1002d76
cmp dword [ebp - 0xc], ebx
je 0x1002d76
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x1002c74
cmp dword [ebp - 8], ebx
jne 0x1002d5c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov dword [ebp - 4], eax
lea eax, [ebp - 0xacc]
push eax
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call edi
push esi
lea eax, [ebp - 0x3b0]
push eax
push 4
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call edi
push dword [ebp - 0xc]
lea eax, [ebp - 0x3b0]
push eax
lea eax, [ebp - 0x6bc]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0x1010
lea eax, [ebp - 0xacc]
push eax
lea eax, [ebp - 0x6bc]
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x1002d5c
push dword [ebp - 0x18]
lea eax, [ebp - 0x6bc]
push 0x1001264
push dword [ebp - 0xc]
push 0x1001390
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
lea eax, [ebp - 0x6bc]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x1002d5c
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x6bc]
push eax
call fcn.010018d1
test eax, eax
je 0x1002d5c
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x164]
sub eax, ecx
inc eax
inc eax
push eax
lea eax, [ebp - 0x164]
push eax
lea eax, [ebp - 0x7c0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push dword [ebp - 0x18]
lea eax, [ebp - 0x7c0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x7c0]
push eax
call fcn.010018d1
test eax, eax
je 0x1002d5c
mov ecx, dword [ebp - 0x44]
xor eax, eax
mov dword [ebp - 0x54], ecx
mov ecx, dword [ebp - 0x3c]
or eax, ecx
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x54]
xor edx, edx
or eax, edx
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x2c]
xor ecx, ecx
or ecx, eax
mov eax, dword [ebp - 0x3c]
or eax, edx
cmp eax, dword [ebp - 0x44]
jb 0x1002d5c
ja 0x1002d48
cmp ecx, dword [ebp - 0x48]
jbe 0x1002d5c
lea eax, [ebp - 0x6bc]
push eax
lea eax, [ebp - 0x4b4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push dword [ebp - 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 4], ebx
jne 0x1002efb
push esi
lea eax, [ebp - 0x3b0]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x10027b0
push 0x1001384
lea eax, [ebp - 0x3b0]
push eax
call fcn.01001890
lea eax, [ebp - 0x3b0]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x1003022
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x164]
sub eax, ecx
inc eax
inc eax
push eax
lea eax, [ebp - 0x164]
push eax
lea eax, [ebp - 0x7c0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push 0x1001370
lea eax, [ebp - 0x7c0]
push eax
call fcn.01001890
push 1
lea eax, [ebp - 0x3b0]
push eax
lea eax, [ebp - 0x7c0]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x10027b0
mov eax, dword [ebp - 0x14]
mov byte [eax], bl
cmp byte [ebp - 0x4b4], bl
jne 0x1002e37
lea eax, [ebp - 0x164]
push eax
lea eax, [ebp - 0x4b4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push dword [ebp - 0x18]
lea eax, [ebp - 0x4b4]
push eax
call fcn.01001890
lea eax, [ebp - 0x4b4]
push eax
mov dword [ebp - 8], ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp eax, ebx
mov dword [ebp - 0x18], eax
je 0x1002e92
push 0x1001368
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x1002e84
lea ecx, [ebp - 0x28]
push ecx
push dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x38]
push dword [ebp - 0x20]
neg ecx
sbb ecx, ecx
lea edx, [ebp - 0x164]
and ecx, edx
push ecx
call eax
mov dword [ebp - 4], eax
mov dword [ebp - 8], 1
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 8], ebx
jne 0x1002efb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov dword [ebp - 4], eax
lea eax, [ebp - 0xacc]
push eax
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call edi
push esi
lea eax, [ebp - 0x3b0]
push eax
push 2
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call edi
lea eax, [ebp - 0x4b4]
push eax
lea eax, [ebp - 0x3b0]
push eax
lea eax, [ebp - 0x6bc]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0x1010
lea eax, [ebp - 0xacc]
push eax
lea eax, [ebp - 0x6bc]
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp dword [ebp - 0x34], ebx
je 0x1002fbe
cmp dword [ebp - 0x38], ebx
je 0x1002fbe
lea eax, [ebp - 0x164]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x1002fbe
lea eax, [ebp - 0x164]
push eax
lea eax, [ebp - 0x8c4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x268]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x1002f57
push esi
lea eax, [ebp - 0x268]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x268]
push eax
call main
cmp eax, ebx
je 0x1002f6e
cmp byte [eax + 1], bl
jne 0x1002f6e
mov byte [eax], bl
mov esi, dword [ebp - 0x14]
push ebx
push esi
lea eax, [ebp - 0x268]
push eax
lea eax, [ebp - 0x8c4]
push eax
mov byte [esi], 0x5c
call fcn.01001415
test eax, eax
je 0x1002fbe
push ebx
push 0x100135c
push esi
lea eax, [ebp - 0x268]
push eax
call fcn.0100195f
test eax, eax
jne 0x1002fbe
push esi
lea eax, [ebp - 0x268]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x268]
push eax
call fcn.010015c4
cmp dword [ebp - 4], ebx
jne 0x1003019
cmp dword [ebp - 0x28], ebx
je 0x1003019
push 0x11
pop ecx
xor eax, eax
lea edi, [ebp - 0x2ac]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x2ac]
push eax
push ebx
push ebx
push 0x20
push ebx
push ebx
push ebx
push dword [ebp - 0x28]
mov dword [ebp - 0x2ac], 0x44
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x1003008
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
push dword [ebp - 0x28]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ExitProcess]
test al, 0x10
je 0x1002e07
push 0x10b
jmp 0x100301c