Function at 0x493010
Capabilities:
Check if file exists
Copy file
Create process on windows
Delete file
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a44e6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x544
push ebx
push esi
mov esi, ecx
push edi
xor ebx, ebx
mov dword [ebp - 0x10], esp
mov al, byte [esi + 0x47a]
mov dword [ebp - 0x38], esi
test al, al
mov dword [ebp - 4], ebx
jne 0x493121
cmp dword [esi + 0x4ec], ebx
je 0x493121
mov eax, dword [esi + 0x4c8]
mov edx, dword [esi + 0x4cc]
sub eax, edx
cmp eax, 1
jg 0x493121
call fcn.00492fc0
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x4c], edi
je 0x493121
mov eax, dword [0x65ec1c]
lea ecx, [ebp - 0xa0]
mov dword [ebp - 0xb8], eax
mov dword [ebp - 0xb0], eax
mov dword [ebp - 0xac], ebx
mov dword [ebp - 0xa4], ebx
mov word [ebp - 0xa8], bx
call fcn.00440200
mov eax, dword [0x65ec1c]
mov dword [ebp - 0x108], 0x5bd0e4
mov dword [ebp - 0x94], eax
mov dword [ebp - 0x90], eax
mov dword [ebp - 0x8c], eax
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x54], ebx
lea ecx, [ebp - 0x108]
push ebx
push ecx
push edi
lea ecx, [esi + 8]
mov byte [ebp - 4], 1
call fcn.0055dfa0
test al, al
jne 0x493132
lea ecx, [ebp - 0x108]
mov byte [ebp - 4], 0
call fcn.00451870
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
push 0x20
call fcn.00584a5c
add esp, 4
cmp eax, ebx
mov dword [ebp - 0x34], eax
je 0x4931e7
mov edx, dword [0x65ec1c]
lea ecx, [eax + 0xc]
mov dword [ebp - 0x18], ecx
mov dword [ecx], edx
mov edx, dword [0x65ec1c]
lea ecx, [eax + 0x10]
mov dword [ebp - 0x28], ecx
mov dword [ecx], edx
mov dword [eax + 0x14], ebx
mov byte [eax + 0x1c], 0
mov byte [eax + 0x1d], 0
mov dword [eax], ebx
mov byte [eax + 0x1e], 0
mov dword [eax + 4], edi
mov ecx, dword [esi + 0x544]
mov dword [eax + 8], ecx
mov ecx, dword [ebp - 0x74]
mov eax, dword [ecx - 8]
cmp eax, 5
jg 0x493191
mov ecx, dword [ebp - 0xb8]
mov edx, dword [ebp - 0x18]
push ecx
push 0x638fa8
push edx
call fcn.0058148b
mov eax, dword [0x65ec1c]
add esp, 0xc
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x94]
mov byte [ebp - 4], 2
mov byte [ebp - 0x21], 0
cmp dword [eax - 8], ebx
jle 0x493206
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x493206
mov ecx, dword [ebp - 0x94]
lea edx, [ebp - 0x20]
push ecx
push 0x638fa8
push edx
call fcn.0058148b
add esp, 0xc
jmp 0x49345c
mov ecx, dword [0x663778]
cmp ecx, ebx
je 0x493112
push 1
push str.Gr_SPHtml2__mem_alloc_err_n
call fcn.00478c60
jmp 0x493112
cmp byte [ebp - 0xca], 4
jne 0x4933fb
mov eax, dword [ebp - 0xac]
cmp eax, ebx
jne 0x493223
lea eax, [ebp - 0xa8]
push eax
call fcn.0056ca2e
add esp, 4
test eax, eax
jbe 0x4933fb
mov eax, dword [ebp - 0xac]
cmp eax, ebx
jne 0x493244
lea eax, [ebp - 0xa8]
push eax
call fcn.00436140
add esp, 4
cmp eax, 0xffffffff
je 0x4933fb
mov eax, dword [0x65ec1c]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x94]
mov byte [ebp - 4], 3
mov ecx, dword [eax - 8]
cmp ecx, ebx
mov ebx, eax
jg 0x493274
mov ebx, dword [ebp - 0x78]
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x4932b5
push eax
call fcn.0056db81
mov edi, eax
push edi
call fcn.0056eb1d
add esp, 8
call fcn.0056eb2a
mov ecx, dword [esi + 0x424]
push eax
push edi
push ecx
lea edx, [ebp - 0x30]
push str._s_lda_ld_
push edx
call fcn.0058148b
mov ebx, dword [ebp - 0x30]
add esp, 0x14
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x4933e8
mov eax, dword [0x65ec1c]
mov dword [ebp - 0x14], eax
push ebx
lea ecx, [ebp - 0x14]
push 0x638fa8
push ecx
mov byte [ebp - 4], 4
call fcn.0058148b
mov edx, dword [ebp - 0x14]
add esp, 0xc
push 0x5c
push edx
call fcn.0056c5b0
xor edi, edi
add esp, 8
cmp eax, edi
je 0x493347
mov byte [eax + 1], 0
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x493347
mov ecx, dword [ebp - 0x14]
push edi
push ecx
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x3c], edi
mov word [ebp - 0x40], di
call fcn.00402600
mov eax, dword [ebp - 0x44]
mov byte [ebp - 4], 5
cmp eax, edi
jne 0x493331
lea eax, [ebp - 0x40]
push edi
push eax
call fcn.00465850
add esp, 8
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 4
call fcn.00401070
cmp dword [0x63c2c4], edi
je 0x493392
push edi
push ebx
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x3c], edi
mov word [ebp - 0x40], di
call fcn.00402600
mov eax, dword [ebp - 0x44]
cmp eax, edi
mov ecx, eax
jne 0x49336f
lea ecx, [ebp - 0x40]
mov eax, dword [ebp - 0xac]
cmp eax, edi
jne 0x49337f
lea eax, [ebp - 0xa8]
push edi
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea ecx, [ebp - 0x44]
call fcn.00401070
jmp 0x4933bf
mov eax, dword [ebp - 0xac]
cmp eax, edi
jne 0x4933a2
lea eax, [ebp - 0xa8]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00588780
mov edx, dword [ebp - 0x1c]
push edi
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea ecx, [ebp - 0x1c]
call fcn.005886c0
push ebx
lea eax, [ebp - 0x20]
push 0x638fa8
push eax
call fcn.0058148b
mov ecx, dword [ebp - 0x34]
add esp, 0xc
mov bl, 1
mov byte [ebp - 4], 3
mov byte [ecx + 0x1e], 1
lea ecx, [ebp - 0x14]
call fcn.005886c0
jmp 0x4933eb
mov bl, byte [ebp - 0x21]
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call fcn.005886c0
test bl, bl
jne 0x49345c
mov ecx, dword [0x663778]
test ecx, ecx
je 0x493411
push 1
push str.Error_839417
call fcn.00478c60
mov esi, dword [ebp - 0x34]
mov dword [ebp - 0x4c], esi
mov al, byte [esi + 0x1e]
mov byte [ebp - 4], 6
test al, al
je 0x49342e
mov edx, dword [ebp - 0x28]
mov eax, dword [edx]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [ebp - 0x28]
call fcn.005886c0
mov ecx, dword [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.005886c0
push esi
call fcn.00584a85
add esp, 4
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 1
call fcn.005886c0
jmp 0x493112
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x28]
push eax
push 0x638fa8
push ecx
call fcn.0058148b
mov cl, byte [esi + 0x284]
mov al, byte [esi + 0x285]
add esp, 0xc
xor ebx, ebx
test cl, cl
setne bl
test al, al
je 0x49348b
or ebx, 2
mov dword [esi + 0x500], 0
mov edx, dword [0x65ec1c]
mov dword [ebp - 0x2c], edx
lea eax, [ebp - 0x350]
push 0x104
push eax
push 0
mov byte [ebp - 4], 7
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [ebp - 0x550]
lea edx, [ebp - 0x450]
push ecx
lea eax, [ebp - 0x24c]
push edx
lea ecx, [ebp - 0x50]
push eax
lea edx, [ebp - 0x350]
push ecx
push edx
call fcn.0056d0ac
add esp, 0x14
lea eax, [ebp - 0x24c]
lea ecx, [ebp - 0x50]
lea edx, [ebp - 0x2c]
push str.IDMGrHlp.exe
push eax
push ecx
push 0x6399cc
push edx
call fcn.0058148b
mov eax, dword [ebp - 0x2c]
add esp, 0x14
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4937d6
mov ecx, 0x11
xor eax, eax
lea edi, [ebp - 0x14c]
rep stosd dword es:[edi], eax
mov ecx, dword [0x65ec1c]
mov dword [ebp - 0x14c], 0x44
mov dword [ebp - 0x120], 0x81
mov word [ebp - 0x11c], ax
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xb0]
mov byte [ebp - 4], 8
mov eax, dword [edx]
mov edx, dword [ebp - 0x28]
push eax
push ecx
mov eax, dword [edx]
mov ecx, dword [ebp - 0x4c]
mov edx, dword [esi + 0x548]
push eax
mov eax, dword [ebp - 0x2c]
push ecx
push ebx
push edx
push eax
lea ecx, [ebp - 0x14]
push str.__s___a_2__w__ld__fl__ld__i__ld__fn___s___ct___s___u___s_
push ecx
call fcn.0058148b
add esp, 0x24
lea edx, [ebp - 0x48]
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x14c]
push edx
push eax
push 0
push 0
push 0x30
push 1
push 0
push 0
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x4937f3
mov edx, dword [ebp - 0x44]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call edi
mov eax, dword [ebp - 0x48]
push eax
call edi
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 7
call fcn.005886c0
xor edi, edi
push edi
call fcn.0056db81
mov ecx, dword [ebp - 0x34]
add esp, 4
mov dword [ecx + 0x18], eax
mov byte [ecx + 0x1c], 1
mov eax, dword [esi + 0x528]
mov ecx, dword [esi + 0x524]
mov ebx, eax
mov dword [ebp - 0x28], ebx
inc ebx
cmp ebx, edi
jne 0x49362e
cmp ecx, edi
je 0x49361d
mov edx, eax
dec eax
test edx, edx
je 0x493608
add ecx, 8
jmp 0x4935fc
mov eax, dword [esi + 0x524]
push eax
call fcn.00584a85
add esp, 4
mov dword [esi + 0x524], edi
mov dword [esi + 0x52c], edi
mov dword [esi + 0x528], edi
jmp 0x4937b3
cmp ecx, edi
jne 0x493686
lea edi, [ebx*8]
push edi
call fcn.00584a5c
mov edx, eax
mov ecx, edi
mov dword [ebp - 0x1c], edx
mov edi, edx
mov edx, ecx
mov dword [esi + 0x524], eax
xor eax, eax
add esp, 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov dword [ebp - 0x18], ebx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp - 0x1c]
mov ecx, ebx
mov edx, ecx
dec ecx
test edx, edx
je 0x493675
add eax, 8
jmp 0x493669
mov dword [esi + 0x52c], ebx
mov dword [esi + 0x528], ebx
jmp 0x4937b3
mov edi, dword [esi + 0x52c]
cmp ebx, edi
jg 0x4936e5
cmp eax, ebx
jge 0x4936c4
mov edx, ebx
lea edi, [ecx + eax*8]
sub edx, eax
xor eax, eax
mov dword [ebp - 0x1c], edi
lea ecx, [edx*8]
mov esi, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp - 0x1c]
mov ecx, edx
dec edx
test ecx, ecx
je 0x4936d7
add eax, 8
jmp 0x4936b8
jle 0x4936da
sub eax, ebx
lea ecx, [ecx + ebx*8]
mov edx, eax
dec eax
test edx, edx
je 0x4936da
add ecx, 8
jmp 0x4936cb
mov esi, dword [ebp - 0x38]
mov dword [esi + 0x528], ebx
jmp 0x4937b3
mov ecx, dword [esi + 0x530]
test ecx, ecx
jne 0x493713
cdq
and edx, 7
add eax, edx
mov ecx, eax
sar ecx, 3
cmp ecx, 4
jge 0x493706
mov ecx, 4
jmp 0x493713
cmp ecx, 0x400
jle 0x493713
mov ecx, 0x400
lea eax, [edi + ecx]
cmp ebx, eax
jl 0x49371c
mov eax, ebx
mov dword [ebp - 0x1c], eax
shl eax, 3
push eax
call fcn.00584a5c
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x18], eax
mov edi, eax
add esp, 4
mov ecx, dword [edx + 0x528]
mov esi, dword [edx + 0x524]
shl ecx, 3
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [edx + 0x528]
mov ecx, dword [ebp - 0x18]
mov edx, ebx
sub edx, eax
lea edi, [ecx + eax*8]
xor eax, eax
mov dword [ebp - 0x30], edi
lea ecx, [edx*8]
mov esi, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp - 0x30]
mov ecx, edx
dec edx
test ecx, ecx
je 0x493789
add eax, 8
jmp 0x49377d
mov esi, dword [ebp - 0x38]
mov eax, dword [esi + 0x524]
push eax
call fcn.00584a85
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
add esp, 4
mov dword [esi + 0x524], edx
mov dword [esi + 0x528], ebx
mov dword [esi + 0x52c], eax
mov ecx, dword [esi + 0x524]
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x4c]
mov dword [ecx + eax*8], edx
mov edx, dword [ebp - 0x34]
mov dword [ecx + eax*8 + 4], edx
mov eax, dword [esi + 0x4c8]
inc eax
mov dword [esi + 0x4c8], eax
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 2
call fcn.005886c0
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 1
call fcn.005886c0
jmp 0x493112
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 7
call fcn.005886c0
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 2
call fcn.005886c0
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 1
call fcn.005886c0
jmp 0x493112