Function at 0x489260
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 0x5858fe
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x550
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 - 0x30], esi
test al, al
mov dword [ebp - 4], ebx
jne 0x48937a
cmp dword [esi + 0x4ec], ebx
je 0x48937a
mov eax, dword [esi + 0x4c8]
mov edx, dword [esi + 0x4cc]
sub eax, edx
cmp eax, 1
jg 0x48937a
call fcn.00489210
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x44], edi
je 0x48937a
mov eax, dword [0x639ad4]
lea ecx, [ebp - 0xac]
mov dword [ebp - 0xc4], eax
mov dword [ebp - 0xbc], eax
mov dword [ebp - 0xb8], ebx
mov dword [ebp - 0xb0], ebx
mov word [ebp - 0xb4], bx
call fcn.00476c60
mov eax, dword [0x639ad4]
mov dword [ebp - 0x114], 0x59c97c
mov dword [ebp - 0xa0], eax
mov dword [ebp - 0x9c], eax
mov dword [ebp - 0x98], eax
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], ebx
mov dword [ebp - 0x70], ebx
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x60], ebx
lea ecx, [ebp - 0x114]
push ebx
push ecx
push edi
lea ecx, [esi + 8]
mov byte [ebp - 4], 1
call fcn.0053fa00
test al, al
jne 0x48938b
lea ecx, [ebp - 0x114]
mov byte [ebp - 4], 0
call fcn.0044b000
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.0056649c
add esp, 4
cmp eax, ebx
mov dword [ebp - 0x34], eax
je 0x489440
mov edx, dword [0x639ad4]
lea ecx, [eax + 0xc]
mov dword [ebp - 0x14], ecx
mov dword [ecx], edx
mov edx, dword [0x639ad4]
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 - 0x80]
mov eax, dword [ecx - 8]
cmp eax, 5
jg 0x4893ea
mov ecx, dword [ebp - 0xc4]
mov edx, dword [ebp - 0x14]
push ecx
push 0x615e9c
push edx
call fcn.00562ecb
mov eax, dword [0x639ad4]
add esp, 0xc
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0xa0]
mov byte [ebp - 4], 2
mov byte [ebp - 0x1d], 0
cmp dword [eax - 8], ebx
jle 0x48945f
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x48945f
mov ecx, dword [ebp - 0xa0]
lea edx, [ebp - 0x1c]
push ecx
push 0x615e9c
push edx
call fcn.00562ecb
add esp, 0xc
jmp 0x4896d1
mov ecx, dword [0x63e600]
cmp ecx, ebx
je 0x48936b
push 1
push str.Gr_SPHtml2__mem_alloc_err_n
call fcn.0046f830
jmp 0x48936b
cmp byte [ebp - 0xd6], 4
jne 0x489670
mov eax, dword [ebp - 0xb8]
cmp eax, ebx
jne 0x48947c
lea eax, [ebp - 0xb4]
push eax
call fcn.0054e46e
add esp, 4
test eax, eax
jbe 0x489670
mov eax, dword [ebp - 0xb8]
cmp eax, ebx
jne 0x48949d
lea eax, [ebp - 0xb4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x489670
mov eax, dword [0x639ad4]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0xa0]
mov byte [ebp - 4], 3
mov ecx, dword [eax - 8]
cmp ecx, ebx
mov ebx, eax
jg 0x4894ce
mov ebx, dword [ebp - 0x84]
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x48950f
push eax
call fcn.0054f551
mov edi, eax
push edi
call fcn.0055051d
add esp, 8
call fcn.0055052a
mov ecx, dword [esi + 0x424]
push eax
push edi
push ecx
lea edx, [ebp - 0x2c]
push str._s_lda_ld_
push edx
call fcn.00562ecb
mov ebx, dword [ebp - 0x2c]
add esp, 0x14
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x48965d
mov eax, dword [0x639ad4]
mov dword [ebp - 0x18], eax
push ebx
lea ecx, [ebp - 0x18]
push 0x615e9c
push ecx
mov byte [ebp - 4], 4
call fcn.00562ecb
mov edx, dword [ebp - 0x18]
add esp, 0xc
push 0x5c
push edx
call fcn.0054dff0
xor edi, edi
add esp, 8
cmp eax, edi
je 0x4895a1
mov byte [eax + 1], 0
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4895a1
mov ecx, dword [ebp - 0x18]
push edi
push ecx
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x58], edi
mov dword [ebp - 0x50], edi
mov word [ebp - 0x54], di
call fcn.004024c0
mov eax, dword [ebp - 0x58]
mov byte [ebp - 4], 5
cmp eax, edi
jne 0x48958b
lea eax, [ebp - 0x54]
push edi
push eax
call fcn.0045d660
add esp, 8
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 4
call fcn.00401070
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x38], edi
mov word [ebp - 0x3c], di
call fcn.00401070
cmp ebx, edi
je 0x489600
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x489600
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push eax
push eax
push 0xffffffffffffffff
push ebx
push eax
push eax
call edi
test eax, eax
mov dword [ebp - 0x38], eax
je 0x489600
lea edx, [eax + eax + 2]
push edx
call fcn.0056649c
add esp, 4
mov dword [ebp - 0x40], eax
test eax, eax
je 0x489603
mov ecx, dword [ebp - 0x38]
push ecx
push eax
push 0xffffffffffffffff
push ebx
push 0
push 0
call edi
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x40]
test eax, eax
mov byte [ebp - 4], 6
jne 0x48960e
lea eax, [ebp - 0x3c]
mov ecx, dword [ebp - 0xb8]
test ecx, ecx
jne 0x48961e
lea ecx, [ebp - 0xb4]
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push ebx
lea edx, [ebp - 0x1c]
push 0x615e9c
push edx
call fcn.00562ecb
mov eax, dword [ebp - 0x34]
add esp, 0xc
lea ecx, [ebp - 0x40]
mov bl, 1
mov byte [eax + 0x1e], 1
mov byte [ebp - 4], 4
call fcn.00401070
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 3
call fcn.0056a100
jmp 0x489660
mov bl, byte [ebp - 0x1d]
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 2
call fcn.0056a100
test bl, bl
jne 0x4896d1
mov ecx, dword [0x63e600]
test ecx, ecx
je 0x489686
push 1
push str.Error_839417
call fcn.0046f830
mov esi, dword [ebp - 0x34]
mov dword [ebp - 0x48], esi
mov al, byte [esi + 0x1e]
mov byte [ebp - 4], 7
test al, al
je 0x4896a3
mov ecx, dword [ebp - 0x28]
mov eax, dword [ecx]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [ebp - 0x28]
call fcn.0056a100
mov ecx, dword [ebp - 0x14]
mov byte [ebp - 4], 2
call fcn.0056a100
push esi
call fcn.005664c5
add esp, 4
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call fcn.0056a100
jmp 0x48936b
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x28]
push edx
push 0x615e9c
push eax
call fcn.00562ecb
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 0x489700
or ebx, 2
mov dword [esi + 0x500], 0
mov ecx, dword [0x639ad4]
mov dword [ebp - 0x24], ecx
lea edx, [ebp - 0x35c]
push 0x104
push edx
push 0
mov byte [ebp - 4], 8
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x45c]
lea ecx, [ebp - 0x55c]
push eax
lea edx, [ebp - 0x258]
push ecx
lea eax, [ebp - 0x4c]
push edx
lea ecx, [ebp - 0x35c]
push eax
push ecx
call fcn.0054ea7c
add esp, 0x14
lea edx, [ebp - 0x258]
lea eax, [ebp - 0x4c]
lea ecx, [ebp - 0x24]
push str.IDMGrHlp.exe
push edx
push eax
push 0x6168c4
push ecx
call fcn.00562ecb
mov edx, dword [ebp - 0x24]
add esp, 0x14
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x489a45
mov ecx, 0x11
xor eax, eax
lea edi, [ebp - 0x158]
rep stosd dword es:[edi], eax
mov word [ebp - 0x128], ax
mov eax, dword [0x639ad4]
mov dword [ebp - 0x158], 0x44
mov dword [ebp - 0x12c], 0x81
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xbc]
mov byte [ebp - 4], 9
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x28]
push edx
push eax
mov edx, dword [ecx]
mov eax, dword [ebp - 0x44]
mov ecx, dword [esi + 0x548]
push edx
mov edx, dword [ebp - 0x24]
push eax
push ebx
push ecx
push edx
lea eax, [ebp - 0x18]
push str.__s___a_2__w__ld__fl__ld__i__ld__fn___s___ct___s___u___s_
push eax
call fcn.00562ecb
add esp, 0x24
lea ecx, [ebp - 0x5c]
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 0x158]
push ecx
push edx
push 0
push 0
push 0x30
push 1
push 0
push 0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x489a62
mov ecx, dword [ebp - 0x58]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call edi
mov edx, dword [ebp - 0x5c]
push edx
call edi
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 8
call fcn.0056a100
xor edi, edi
push edi
call fcn.0054f551
mov ecx, dword [ebp - 0x34]
add esp, 4
mov dword [ecx + 0x18], eax
mov byte [ecx + 0x1c], 1
mov ecx, dword [esi + 0x528]
mov eax, dword [esi + 0x524]
mov ebx, ecx
mov dword [ebp - 0x48], ebx
inc ebx
cmp ebx, edi
jne 0x4898a2
cmp eax, edi
je 0x489891
mov edx, ecx
dec ecx
test edx, edx
je 0x48987c
add eax, 8
jmp 0x489870
mov eax, dword [esi + 0x524]
push eax
call fcn.005664c5
add esp, 4
mov dword [esi + 0x524], edi
mov dword [esi + 0x52c], edi
mov dword [esi + 0x528], edi
jmp 0x489a22
cmp eax, edi
jne 0x4898f7
lea edi, [ebx*8]
push edi
call fcn.0056649c
mov ecx, edi
mov dword [esi + 0x524], eax
mov edx, eax
mov esi, ecx
xor eax, eax
mov edi, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
add esp, 4
and ecx, 3
mov dword [ebp - 0x14], ebx
rep stosb byte es:[edi], al
mov eax, ebx
mov ecx, eax
dec eax
test ecx, ecx
je 0x4898e3
add edx, 8
jmp 0x4898d7
mov esi, dword [ebp - 0x30]
mov dword [esi + 0x52c], ebx
mov dword [esi + 0x528], ebx
jmp 0x489a22
mov edi, dword [esi + 0x52c]
cmp ebx, edi
jg 0x489956
cmp ecx, ebx
jge 0x489935
mov edx, ebx
lea edi, [eax + ecx*8]
sub edx, ecx
xor eax, eax
mov dword [ebp - 0x14], 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 - 0x14]
mov ecx, edx
dec edx
test ecx, ecx
je 0x489948
add eax, 8
jmp 0x489929
jle 0x48994b
sub ecx, ebx
lea eax, [eax + ebx*8]
mov edx, ecx
dec ecx
test edx, edx
je 0x48994b
add eax, 8
jmp 0x48993c
mov esi, dword [ebp - 0x30]
mov dword [esi + 0x528], ebx
jmp 0x489a22
mov eax, dword [esi + 0x530]
test eax, eax
jne 0x489983
mov eax, ecx
cdq
and edx, 7
add eax, edx
sar eax, 3
cmp eax, 4
jge 0x489977
mov eax, 4
jmp 0x489983
cmp eax, 0x400
jle 0x489983
mov eax, 0x400
add eax, edi
cmp ebx, eax
jl 0x48998b
mov eax, ebx
mov dword [ebp - 0x2c], eax
shl eax, 3
push eax
call fcn.0056649c
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x14], 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 - 0x14]
mov edx, ebx
sub edx, eax
lea edi, [ecx + eax*8]
xor eax, eax
mov dword [ebp - 0x28], 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 - 0x28]
mov ecx, edx
dec edx
test ecx, ecx
je 0x4899f8
add eax, 8
jmp 0x4899ec
mov esi, dword [ebp - 0x30]
mov eax, dword [esi + 0x524]
push eax
call fcn.005664c5
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x2c]
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 - 0x48]
mov edx, dword [ebp - 0x44]
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 - 0x24]
mov byte [ebp - 4], 2
call fcn.0056a100
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call fcn.0056a100
jmp 0x48936b
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 8
call fcn.0056a100
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 2
call fcn.0056a100
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call fcn.0056a100
jmp 0x48936b