Function at 0x46f460
Capabilities:
Check if file exists
Create process on windows
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55182e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x52c
push ebx
mov ebx, ecx
push esi
push edi
mov al, byte [ebx + 0x462]
xor esi, esi
test al, al
mov dword [ebp - 0x10], esp
mov dword [ebp - 4], esi
jne 0x46f541
cmp dword [ebx + 0x4d4], esi
je 0x46f541
mov eax, dword [ebx + 0x4b0]
mov edx, dword [ebx + 0x4b4]
sub eax, edx
cmp eax, 1
jg 0x46f541
call fcn.0046f410
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x2c], edi
je 0x46f541
mov eax, dword [0x5b5ecc]
mov dword [ebp - 0xe0], 0x5602e8
mov dword [ebp - 0x90], 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], eax
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x3c], esi
lea ecx, [ebp - 0xe0]
push esi
push ecx
push edi
lea ecx, [ebx + 8]
mov byte [ebp - 4], 1
call fcn.00510d00
test al, al
jne 0x46f552
lea ecx, [ebp - 0xe0]
mov byte [ebp - 4], 0
call fcn.0043c730
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.005380a1
mov esi, eax
add esp, 4
test esi, esi
mov dword [ebp - 0x28], esi
je 0x46f5f0
mov edx, dword [0x5b5ecc]
mov dword [esi + 0xc], edx
mov eax, dword [0x5b5ecc]
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], 0
mov byte [esi + 0x1c], 0
mov byte [esi + 0x1d], 0
mov dword [esi], 0
mov dword [esi + 4], edi
mov ecx, dword [ebx + 0x52c]
mov dword [esi + 8], ecx
mov ecx, dword [ebp - 0x60]
mov eax, dword [ecx - 8]
cmp eax, 5
jg 0x46f5ac
mov ecx, dword [ebp - 0x90]
push ecx
lea edi, [esi + 0xc]
push 0x597ddc
push edi
call fcn.0053091a
mov edx, dword [0x5b5ecc]
add esp, 0xc
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x80]
mov byte [ebp - 4], 2
mov ecx, dword [eax - 8]
test ecx, ecx
jle 0x46f60f
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x46f60f
mov eax, dword [ebp - 0x80]
lea ecx, [ebp - 0x18]
push eax
push 0x597ddc
push ecx
jmp 0x46f647
mov ecx, dword [0x5ba970]
test ecx, ecx
je 0x46f532
push 1
push str.Gr_SPHtml2__mem_alloc_err_n
call fcn.004593e0
jmp 0x46f532
cmp byte [ebp - 0xa2], 4
jne 0x46f807
mov eax, dword [ebp - 0x7c]
mov ecx, dword [eax - 8]
test ecx, ecx
jle 0x46f807
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x46f807
mov edx, dword [ebp - 0x7c]
lea eax, [ebp - 0x18]
push edx
push 0x597ddc
push eax
call fcn.0053091a
mov ecx, dword [ebp - 0x18]
add esp, 0xc
lea eax, [esi + 0x10]
push ecx
push 0x597ddc
push eax
call fcn.0053091a
mov cl, byte [ebx + 0x284]
mov al, byte [ebx + 0x285]
add esp, 0xc
xor edx, edx
test cl, cl
setne dl
test al, al
mov dword [ebp - 0x14], edx
je 0x46f685
mov eax, edx
or al, 2
mov dword [ebp - 0x14], eax
mov dword [ebx + 0x4e8], 0
mov eax, dword [0x5b5ecc]
mov dword [ebp - 0x1c], eax
lea ecx, [ebp - 0x238]
push 0x104
push ecx
push 0
mov byte [ebp - 4], 4
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [ebp - 0x438]
lea eax, [ebp - 0x538]
push edx
lea ecx, [ebp - 0x338]
push eax
lea edx, [ebp - 0x38]
push ecx
lea eax, [ebp - 0x238]
push edx
push eax
call fcn.0051d13a
add esp, 0x14
lea ecx, [ebp - 0x338]
lea edx, [ebp - 0x38]
lea eax, [ebp - 0x1c]
push str.IDMGrHlp.exe
push ecx
push edx
push 0x59879c
push eax
call fcn.0053091a
mov ecx, dword [ebp - 0x1c]
add esp, 0x14
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x46fa19
mov edx, dword [0x5b5ecc]
mov ecx, 0x11
xor eax, eax
lea edi, [ebp - 0x134]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x134], 0x44
mov dword [ebp - 0x108], 0x81
mov word [ebp - 0x104], ax
mov dword [ebp - 0x24], edx
mov eax, dword [esi + 0xc]
mov ecx, dword [ebp - 0x88]
mov edx, dword [esi + 0x10]
push eax
mov eax, dword [ebp - 0x2c]
push ecx
mov ecx, dword [ebp - 0x14]
push edx
mov edx, dword [ebx + 0x530]
push eax
mov eax, dword [ebp - 0x1c]
push ecx
push edx
push eax
lea ecx, [ebp - 0x24]
push str.__s___a_2__w__ld__fl__ld__i__ld__fn___s___ct___s___u___s_
push ecx
mov byte [ebp - 4], 5
call fcn.0053091a
add esp, 0x24
lea edx, [ebp - 0xf0]
mov ecx, dword [ebp - 0x24]
lea eax, [ebp - 0x134]
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 0x46fa36
mov edx, dword [ebp - 0xec]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call edi
mov eax, dword [ebp - 0xf0]
push eax
call edi
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 4
call fcn.00537b04
push 0
call fcn.0051dc52
mov dword [esi + 0x18], eax
mov byte [esi + 0x1c], 1
mov ecx, dword [ebx + 0x510]
mov eax, dword [ebx + 0x50c]
mov edi, ecx
add esp, 4
mov dword [ebp - 0x14], edi
inc edi
test edi, edi
jne 0x46f86b
xor edi, edi
cmp eax, edi
je 0x46f85a
mov edx, ecx
dec ecx
test edx, edx
je 0x46f845
add eax, 8
jmp 0x46f7fb
mov ecx, dword [0x5ba970]
test ecx, ecx
je 0x46f81d
push 1
push str.Error_839417
call fcn.004593e0
mov dword [ebp - 0x30], esi
lea ecx, [esi + 0x10]
mov byte [ebp - 4], 3
call fcn.00537b04
mov ecx, edi
mov byte [ebp - 4], 2
call fcn.00537b04
push esi
call fcn.005380ca
add esp, 4
jmp 0x46fa25
mov eax, dword [ebx + 0x50c]
push eax
call fcn.005380ca
add esp, 4
mov dword [ebx + 0x50c], edi
mov dword [ebx + 0x514], edi
mov dword [ebx + 0x510], edi
jmp 0x46f9f9
test eax, eax
jne 0x46f8c2
lea esi, [edi*8]
push esi
call fcn.005380a1
mov edx, eax
mov ecx, esi
mov dword [ebx + 0x50c], eax
mov dword [ebp - 0x20], edi
xor eax, eax
mov edi, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
add esp, 4
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp - 0x20]
mov ecx, eax
dec eax
test ecx, ecx
je 0x46f8ab
add edx, 8
jmp 0x46f89f
mov edx, dword [ebp - 0x14]
lea eax, [edx + 1]
mov dword [ebx + 0x514], eax
mov dword [ebx + 0x510], eax
jmp 0x46f9f6
cmp edi, dword [ebx + 0x514]
jg 0x46f923
cmp ecx, edi
jge 0x46f8fe
mov edx, edi
lea edi, [eax + ecx*8]
sub edx, ecx
xor eax, eax
mov dword [ebp - 0x20], 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 - 0x20]
mov ecx, edx
dec edx
test ecx, ecx
je 0x46f911
add eax, 8
jmp 0x46f8f2
jle 0x46f914
sub ecx, edi
lea edi, [eax + edi*8]
mov edx, ecx
dec ecx
test edx, edx
je 0x46f914
add edi, 8
jmp 0x46f905
mov esi, dword [ebp - 0x28]
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebx + 0x510], eax
jmp 0x46f9f9
mov eax, dword [ebx + 0x518]
test eax, eax
jne 0x46f950
mov eax, ecx
cdq
and edx, 7
add eax, edx
sar eax, 3
cmp eax, 4
jge 0x46f944
mov eax, 4
jmp 0x46f950
cmp eax, 0x400
jle 0x46f950
mov eax, 0x400
mov ecx, dword [ebx + 0x514]
add eax, ecx
cmp edi, eax
jl 0x46f95e
mov eax, edi
lea ecx, [eax*8]
mov dword [ebp - 0x20], eax
push ecx
call fcn.005380a1
mov ecx, dword [ebx + 0x510]
mov esi, dword [ebx + 0x50c]
shl ecx, 3
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [ebp - 0x14]
and ecx, 3
add esp, 4
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 0x510]
inc edx
sub edx, ecx
mov dword [ebp - 0x34], eax
lea edi, [eax + ecx*8]
xor eax, eax
lea ecx, [edx*8]
mov dword [ebp - 0x30], edi
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 0x46f9cb
add eax, 8
jmp 0x46f9bf
mov eax, dword [ebx + 0x50c]
push eax
call fcn.005380ca
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x20]
add esp, 4
inc eax
mov dword [ebx + 0x50c], edx
mov dword [ebx + 0x510], eax
mov dword [ebx + 0x514], ecx
mov esi, dword [ebp - 0x28]
mov edx, dword [ebx + 0x50c]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x2c]
mov dword [edx + eax*8], ecx
mov dword [edx + eax*8 + 4], esi
mov eax, dword [ebx + 0x4b0]
inc eax
mov dword [ebx + 0x4b0], eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 2
call fcn.00537b04
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 1
call fcn.00537b04
jmp 0x46f532
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 4
call fcn.00537b04
jmp 0x46fa19