Function at 0x492250
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 0x5a2896
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 0x492361
cmp dword [esi + 0x4ec], ebx
je 0x492361
mov eax, dword [esi + 0x4c8]
mov edx, dword [esi + 0x4cc]
sub eax, edx
cmp eax, 1
jg 0x492361
call fcn.00492200
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x4c], edi
je 0x492361
mov eax, dword [0x65ca8c]
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.0047fa50
mov eax, dword [0x65ca8c]
mov dword [ebp - 0x108], 0x5bb0e4
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.0055c420
test al, al
jne 0x492372
lea ecx, [ebp - 0x108]
mov byte [ebp - 4], 0
call fcn.004511f0
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.00582ecc
add esp, 4
cmp eax, ebx
mov dword [ebp - 0x34], eax
je 0x492427
mov edx, dword [0x65ca8c]
lea ecx, [eax + 0xc]
mov dword [ebp - 0x18], ecx
mov dword [ecx], edx
mov edx, dword [0x65ca8c]
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 0x4923d1
mov ecx, dword [ebp - 0xb8]
mov edx, dword [ebp - 0x18]
push ecx
push 0x636fa0
push edx
call fcn.0057f8fb
mov eax, dword [0x65ca8c]
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 0x492446
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x492446
mov ecx, dword [ebp - 0x94]
lea edx, [ebp - 0x20]
push ecx
push 0x636fa0
push edx
call fcn.0057f8fb
add esp, 0xc
jmp 0x49269c
mov ecx, dword [0x6615e0]
cmp ecx, ebx
je 0x492352
push 1
push str.Gr_SPHtml2__mem_alloc_err_n
call fcn.00478010
jmp 0x492352
cmp byte [ebp - 0xca], 4
jne 0x49263b
mov eax, dword [ebp - 0xac]
cmp eax, ebx
jne 0x492463
lea eax, [ebp - 0xa8]
push eax
call fcn.0056aeae
add esp, 4
test eax, eax
jbe 0x49263b
mov eax, dword [ebp - 0xac]
cmp eax, ebx
jne 0x492484
lea eax, [ebp - 0xa8]
push eax
call fcn.00436000
add esp, 4
cmp eax, 0xffffffff
je 0x49263b
mov eax, dword [0x65ca8c]
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 0x4924b4
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 0x4924f5
push eax
call fcn.0056c001
mov edi, eax
push edi
call fcn.0056cf9d
add esp, 8
call fcn.0056cfaa
mov ecx, dword [esi + 0x424]
push eax
push edi
push ecx
lea edx, [ebp - 0x30]
push str._s_lda_ld_
push edx
call fcn.0057f8fb
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 0x492628
mov eax, dword [0x65ca8c]
mov dword [ebp - 0x14], eax
push ebx
lea ecx, [ebp - 0x14]
push 0x636fa0
push ecx
mov byte [ebp - 4], 4
call fcn.0057f8fb
mov edx, dword [ebp - 0x14]
add esp, 0xc
push 0x5c
push edx
call fcn.0056aa30
xor edi, edi
add esp, 8
cmp eax, edi
je 0x492587
mov byte [eax + 1], 0
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x492587
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.00402610
mov eax, dword [ebp - 0x44]
mov byte [ebp - 4], 5
cmp eax, edi
jne 0x492571
lea eax, [ebp - 0x40]
push edi
push eax
call fcn.004651a0
add esp, 8
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 4
call fcn.00401070
cmp dword [0x63a28c], edi
je 0x4925d2
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.00402610
mov eax, dword [ebp - 0x44]
cmp eax, edi
mov ecx, eax
jne 0x4925af
lea ecx, [ebp - 0x40]
mov eax, dword [ebp - 0xac]
cmp eax, edi
jne 0x4925bf
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 0x4925ff
mov eax, dword [ebp - 0xac]
cmp eax, edi
jne 0x4925e2
lea eax, [ebp - 0xa8]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00586bf3
mov edx, dword [ebp - 0x1c]
push edi
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea ecx, [ebp - 0x1c]
call fcn.00586b33
push ebx
lea eax, [ebp - 0x20]
push 0x636fa0
push eax
call fcn.0057f8fb
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.00586b33
jmp 0x49262b
mov bl, byte [ebp - 0x21]
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call fcn.00586b33
test bl, bl
jne 0x49269c
mov ecx, dword [0x6615e0]
test ecx, ecx
je 0x492651
push 1
push str.Error_839417
call fcn.00478010
mov esi, dword [ebp - 0x34]
mov dword [ebp - 0x4c], esi
mov al, byte [esi + 0x1e]
mov byte [ebp - 4], 6
test al, al
je 0x49266e
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.00586b33
mov ecx, dword [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.00586b33
push esi
call fcn.00582ef5
add esp, 4
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 1
call fcn.00586b33
jmp 0x492352
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x28]
push eax
push 0x636fa0
push ecx
call fcn.0057f8fb
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 0x4926cb
or ebx, 2
mov dword [esi + 0x500], 0
mov edx, dword [0x65ca8c]
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.0056b52c
add esp, 0x14
lea eax, [ebp - 0x24c]
lea ecx, [ebp - 0x50]
lea edx, [ebp - 0x2c]
push str.IDMGrHlp.exe
push eax
push ecx
push 0x6379c4
push edx
call fcn.0057f8fb
mov eax, dword [ebp - 0x2c]
add esp, 0x14
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x492a16
mov ecx, 0x11
xor eax, eax
lea edi, [ebp - 0x14c]
rep stosd dword es:[edi], eax
mov ecx, dword [0x65ca8c]
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.0057f8fb
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 0x492a33
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.00586b33
xor edi, edi
push edi
call fcn.0056c001
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 0x49286e
cmp ecx, edi
je 0x49285d
mov edx, eax
dec eax
test edx, edx
je 0x492848
add ecx, 8
jmp 0x49283c
mov eax, dword [esi + 0x524]
push eax
call fcn.00582ef5
add esp, 4
mov dword [esi + 0x524], edi
mov dword [esi + 0x52c], edi
mov dword [esi + 0x528], edi
jmp 0x4929f3
cmp ecx, edi
jne 0x4928c6
lea edi, [ebx*8]
push edi
call fcn.00582ecc
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 0x4928b5
add eax, 8
jmp 0x4928a9
mov dword [esi + 0x52c], ebx
mov dword [esi + 0x528], ebx
jmp 0x4929f3
mov edi, dword [esi + 0x52c]
cmp ebx, edi
jg 0x492925
cmp eax, ebx
jge 0x492904
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 0x492917
add eax, 8
jmp 0x4928f8
jle 0x49291a
sub eax, ebx
lea ecx, [ecx + ebx*8]
mov edx, eax
dec eax
test edx, edx
je 0x49291a
add ecx, 8
jmp 0x49290b
mov esi, dword [ebp - 0x38]
mov dword [esi + 0x528], ebx
jmp 0x4929f3
mov ecx, dword [esi + 0x530]
test ecx, ecx
jne 0x492953
cdq
and edx, 7
add eax, edx
mov ecx, eax
sar ecx, 3
cmp ecx, 4
jge 0x492946
mov ecx, 4
jmp 0x492953
cmp ecx, 0x400
jle 0x492953
mov ecx, 0x400
lea eax, [edi + ecx]
cmp ebx, eax
jl 0x49295c
mov eax, ebx
mov dword [ebp - 0x1c], eax
shl eax, 3
push eax
call fcn.00582ecc
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 0x4929c9
add eax, 8
jmp 0x4929bd
mov esi, dword [ebp - 0x38]
mov eax, dword [esi + 0x524]
push eax
call fcn.00582ef5
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.00586b33
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 1
call fcn.00586b33
jmp 0x492352
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 7
call fcn.00586b33
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 2
call fcn.00586b33
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 1
call fcn.00586b33
jmp 0x492352