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

Disassembly:
push ebp
lea ebp, [esp - 0x190]
sub esp, 0x190
push 0xffffffffffffffff
push 0x65374d
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x758898]
xor eax, ebp
mov dword [ebp + 0x18c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov dword [ebp - 0x20], edi
xor ebx, ebx
mov dword [ebp - 4], ebx
cmp byte [edi + 0x2cc], bl
je 0x4d5b47
cmp byte [edi + 0x48a], bl
jne 0x4d5b47
cmp dword [edi + 0x504], ebx
je 0x4d5b47
mov eax, dword [edi + 0x4e0]
sub eax, dword [edi + 0x4e4]
cmp eax, 1
jg 0x4d5b47
call fcn.004ce790
mov esi, eax
mov dword [ebp - 0x34], esi
cmp esi, 0xffffffff
je 0x4d5b47
lea ecx, [ebp]
call fcn.004612c0
mov byte [ebp - 4], 1
push ebx
lea ecx, [ebp]
push ecx
push esi
lea ecx, [edi + 8]
call fcn.005ea4c0
test al, al
je 0x4d5b3b
push 0x28
call fcn.005f4e18
add esp, 4
mov dword [ebp - 0x3c], eax
mov byte [ebp - 4], 2
cmp eax, ebx
je 0x4d5b18
mov ecx, eax
call fcn.004d03a0
mov edi, eax
jmp 0x4d5b1a
xor edi, edi
mov dword [ebp - 0x2c], edi
mov byte [ebp - 4], 1
cmp edi, ebx
jne 0x4d5b6c
mov ecx, dword [0x75e22c]
cmp ecx, ebx
je 0x4d5b3b
push 1
push str.Gr_SPHtml2__mem_alloc_err_n
call fcn.004c1d70
mov byte [ebp - 4], 0
lea ecx, [ebp]
call fcn.00461410
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x18c]
xor ecx, ebp
call fcn.00620b8d
add ebp, 0x190
mov esp, ebp
pop ebp
ret
mov dword [edi + 4], esi
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x55c]
mov dword [edi + 8], eax
mov ecx, dword [ebp + 0xa4]
mov eax, dword [ecx - 0xc]
cmp eax, 5
mov eax, ecx
jg 0x4d5b8e
mov eax, dword [ebp + 0x50]
lea ecx, [edi + 0xc]
mov dword [ebp - 0x3c], ecx
push eax
push 0x678ea8
push ecx
call fcn.00402f60
add esp, 0xc
mov dword [ebp + 0xfc], ebx
mov dword [ebp + 0x104], ebx
xor ecx, ecx
mov word [ebp + 0x100], cx
mov byte [ebp - 4], 3
mov byte [ebp - 0x11], cl
mov edx, dword [ebp + 0x74]
cmp edx, ebx
mov eax, edx
jne 0x4d5bcb
lea eax, [ebp + 0x78]
lea esi, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4d5bd0
sub eax, esi
sar eax, 1
je 0x4d5d54
cmp edx, ebx
jne 0x4d5bec
lea edx, [ebp + 0x78]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4d5d54
mov eax, dword [ebp + 0x74]
cmp eax, ebx
jne 0x4d5c06
lea eax, [ebp + 0x78]
push ebx
push eax
push 0x678ea8
lea ecx, [ebp + 0xfc]
call fcn.004021a0
mov byte [ebp - 0x11], 1
mov eax, dword [ebp + 0xfc]
cmp eax, ebx
jne 0x4d5c2c
lea eax, [ebp + 0x100]
push ebx
push eax
push 0x678ea8
lea ecx, [edi + 0x10]
call fcn.004021a0
xor edx, edx
mov eax, dword [ebp - 0x20]
cmp byte [eax + 0x29c], dl
setne dl
mov dword [ebp - 0x30], edx
cmp byte [eax + 0x29d], 0
je 0x4d5c59
or dword [ebp - 0x30], 2
mov dword [eax + 0x518], ebx
mov dword [ebp + 0xf0], ebx
mov dword [ebp + 0xf8], ebx
xor eax, eax
mov word [ebp + 0xf4], ax
mov byte [ebp - 4], 6
mov eax, dword [0x75dc58]
cmp eax, ebx
jne 0x4d5c86
mov eax, 0x75dc5c
push ebx
push str.IDMGrHlp.exe
push eax
push 0x678de0
lea ecx, [ebp + 0xf0]
call fcn.00402310
mov eax, dword [ebp + 0xf0]
cmp eax, ebx
jne 0x4d5cad
lea eax, [ebp + 0xf4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4d6277
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x18], ebx
mov eax, dword [ebp + 0xfc]
cmp eax, ebx
jne 0x4d5cd6
lea eax, [ebp + 0x100]
push eax
lea ecx, [ebp + 0xe4]
call fcn.00402170
mov byte [ebp - 4], 7
cmp dword [0x75e678], ebx
jne 0x4d5fc1
mov eax, dword [ebp + 0xf0]
cmp eax, ebx
jne 0x4d5d02
lea eax, [ebp + 0xf4]
lea ecx, [ebp - 0x18]
push ecx
lea edx, [ebp - 0x38]
push edx
lea ecx, [ebp - 0x1c]
push ecx
push eax
call fcn.004ce040
add esp, 0x10
test eax, eax
je 0x4d5fb9
mov eax, dword [ebp - 0x1c]
cmp eax, 6
jg 0x4d5d45
jne 0x4d5fb9
mov eax, dword [ebp - 0x38]
cmp eax, 6
jg 0x4d5d45
jne 0x4d5fb9
cmp dword [ebp - 0x18], 7
jl 0x4d5fb9
mov dword [0x75e678], 1
jmp 0x4d5fc1
cmp byte [ebp + 0x3e], 4
jne 0x4d5f86
mov esi, dword [ebp + 0x5c]
cmp esi, ebx
mov eax, esi
jne 0x4d5d6a
lea eax, [ebp + 0x60]
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4d5d70
sub eax, edx
sar eax, 1
je 0x4d5f86
cmp esi, ebx
mov eax, esi
jne 0x4d5d8e
lea eax, [ebp + 0x60]
push eax
call fcn.00464110
add esp, 4
cmp eax, 0xffffffff
je 0x4d5f86
mov dword [ebp + 0xe4], ebx
mov dword [ebp + 0xec], ebx
xor edx, edx
mov word [ebp + 0xe8], dx
mov byte [ebp - 4], 4
mov esi, dword [ebp + 0x74]
cmp esi, ebx
mov eax, esi
jne 0x4d5dc5
lea eax, [ebp + 0x78]
lea edx, [eax + 2]
jmp 0x4d5dd0
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4d5dd0
sub eax, edx
sar eax, 1
je 0x4d5dea
cmp esi, ebx
jne 0x4d5dfa
lea esi, [ebp + 0x78]
jmp 0x4d5dfa
mov esi, dword [ebp + 0x98]
cmp esi, ebx
jne 0x4d5dfa
lea esi, [ebp + 0x9c]
mov eax, esi
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4d5e00
sub eax, edx
sar eax, 1
jne 0x4d5e8f
push ebx
call fcn.00624331
mov esi, eax
push esi
call fcn.006258a8
add esp, 8
call fcn.006258ba
mov ecx, dword [ebp - 0x20]
cmp dword [ecx + 0x42c], ebx
je 0x4d5e3c
mov edx, ecx
mov edi, dword [edx + 0x42c]
jmp 0x4d5e44
mov edi, ecx
add edi, 0x430
push ebx
push 0xa
lea ecx, [ebp + 0x108]
push ecx
push eax
call fcn.00623919
add esp, 0xc
push eax
push 0xa
lea edx, [ebp + 0x14c]
push edx
push esi
call fcn.00623919
add esp, 0xc
push eax
push edi
push str._s_sa_s_
lea ecx, [ebp + 0xe4]
call fcn.00411c20
mov esi, dword [ebp + 0xe4]
mov edi, dword [ebp - 0x2c]
cmp esi, ebx
jne 0x4d5e8f
lea esi, [ebp + 0xe8]
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4d5e94
sub eax, edx
sar eax, 1
je 0x4d5f6d
mov dword [ebp + 0xd8], ebx
mov dword [ebp + 0xe0], ebx
xor eax, eax
mov word [ebp + 0xdc], ax
mov byte [ebp - 4], 5
push ebx
push esi
push 0x678ea8
lea ecx, [ebp + 0xd8]
call fcn.004021a0
mov eax, dword [ebp + 0xd8]
cmp eax, ebx
jne 0x4d5ee4
lea eax, [ebp + 0xdc]
push 0x5c
push eax
call fcn.006206a1
add esp, 8
cmp eax, ebx
je 0x4d5f31
add eax, 2
xor ecx, ecx
mov word [eax], cx
mov eax, dword [ebp + 0xd8]
cmp eax, ebx
jne 0x4d5f0b
lea eax, [ebp + 0xdc]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4d5f31
mov eax, dword [ebp + 0xd8]
cmp eax, ebx
jne 0x4d5f27
lea eax, [ebp + 0xdc]
push ebx
push eax
call fcn.004abae0
add esp, 8
mov eax, dword [ebp + 0x5c]
cmp eax, ebx
jne 0x4d5f3b
lea eax, [ebp + 0x60]
push ebx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push ebx
push esi
push 0x678ea8
lea ecx, [ebp + 0xfc]
call fcn.004021a0
mov byte [edi + 0x26], 1
mov byte [ebp - 0x11], 1
mov byte [ebp - 4], 4
lea ecx, [ebp + 0xd8]
call fcn.00401210
mov byte [ebp - 4], 3
lea ecx, [ebp + 0xe4]
call fcn.00401210
cmp byte [ebp - 0x11], 0
jne 0x4d5c1c
mov ecx, dword [0x75e22c]
cmp ecx, ebx
je 0x4d5f9c
push 1
push str.Error_839417
call fcn.004c1d70
push 1
mov ecx, edi
call fcn.004d0c10
mov byte [ebp - 4], 1
lea ecx, [ebp + 0xfc]
call fcn.00401210
jmp 0x4d5b3b
cmp dword [0x75e678], ebx
je 0x4d6040
mov eax, dword [ebp + 0xfc]
cmp eax, ebx
jne 0x4d5fd1
lea eax, [ebp + 0x100]
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push eax
push ebx
push 0xfde9
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
call edi
mov esi, eax
cmp esi, ebx
jle 0x4d6040
lea ecx, [ebp - 0x1c]
call fcn.004024f0
mov byte [ebp - 4], 8
push esi
lea ecx, [ebp - 0x1c]
call fcn.00402840
mov ecx, dword [ebp + 0xfc]
cmp ecx, ebx
jne 0x4d6011
lea ecx, [ebp + 0x100]
push ebx
push ebx
push esi
push eax
push 0xffffffffffffffff
push ecx
push ebx
push 0xfde9
call edi
test eax, eax
je 0x4d6034
push ebx
mov edx, dword [ebp - 0x1c]
push edx
lea ecx, [ebp + 0xe4]
call fcn.00401970
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x1c]
call fcn.00402560
push 0x44
xor esi, esi
push esi
lea eax, [ebp + 0x148]
push eax
call fcn.00621270
add esp, 0xc
mov dword [ebp + 0x148], 0x44
mov dword [ebp + 0x174], 0x81
xor ecx, ecx
mov word [ebp + 0x178], cx
mov edx, dword [ebp - 0x3c]
push edx
lea ecx, [ebp - 0x24]
call fcn.004027e0
mov bl, 9
mov byte [ebp - 4], bl
push 0x25
mov eax, dword [ebp - 0x24]
push eax
call fcn.00622170
add esp, 8
test eax, eax
je 0x4d60a6
push 0x68d018
push 0x68d014
lea ecx, [ebp - 0x24]
call fcn.00402c00
lea ecx, [ebp - 0x28]
call fcn.004024f0
mov byte [ebp - 4], 0xa
cmp dword [0x75e678], esi
mov eax, 0x68d010
jne 0x4d60c4
mov eax, 0x68d00c
mov ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [ebp + 0x58]
push edx
push eax
mov eax, dword [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x30]
push ecx
mov edi, dword [ebp - 0x20]
mov eax, dword [edi + 0x560]
cdq
push edx
push eax
push str.___s___a_2__w__I64d__fl__ld__i__ld___s____s___ct___s___u___s_
lea edx, [ebp - 0x28]
push edx
call fcn.00402f60
add esp, 0x24
mov dword [ebp + 0xc8], esi
mov dword [ebp + 0xd0], esi
xor eax, eax
mov word [ebp + 0xcc], ax
mov byte [ebp - 4], 0xb
cmp dword [0x75e678], esi
je 0x4d6125
mov eax, dword [ebp + 0xe4]
cmp eax, esi
jne 0x4d6135
lea eax, [ebp + 0xe8]
jmp 0x4d6135
mov eax, dword [ebp + 0xfc]
cmp eax, esi
jne 0x4d6135
lea eax, [ebp + 0x100]
mov ecx, dword [ebp + 0xf0]
cmp ecx, esi
jne 0x4d6145
lea ecx, [ebp + 0xf4]
push esi
push eax
push ecx
mov ecx, dword [ebp - 0x28]
push ecx
lea ecx, [ebp + 0xc8]
call fcn.00402310
mov eax, dword [ebp + 0xc8]
cmp eax, esi
jne 0x4d6167
lea eax, [ebp + 0xcc]
lea edx, [ebp + 0xd4]
push edx
lea ecx, [ebp + 0x148]
push ecx
push esi
push esi
push 0x30
push 1
push esi
push esi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
cmp eax, esi
je 0x4d6242
mov edx, dword [ebp + 0xd8]
push edx
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov eax, dword [ebp + 0xd4]
push eax
call esi
mov byte [ebp - 4], 0xa
lea ecx, [ebp + 0xc8]
call fcn.00401210
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x28]
call fcn.00402560
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x24]
call fcn.00402560
mov byte [ebp - 4], 6
lea ecx, [ebp + 0xe4]
call fcn.00401210
mov esi, dword [ebp - 0x2c]
mov dword [ebp - 0x3c], esi
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x40], ecx
push 0
call fcn.00624331
add esp, 4
mov dword [esi + 0x20], eax
mov byte [esi + 0x24], 1
lea edx, [ebp - 0x40]
push edx
lea ecx, [edi + 0x538]
call fcn.004cf7f0
inc dword [edi + 0x4e0]
mov byte [ebp - 4], 3
lea ecx, [ebp + 0xf0]
call fcn.00401210
mov byte [ebp - 4], 1
lea ecx, [ebp + 0xfc]
call fcn.00401210
mov byte [ebp - 4], 0
lea ecx, [ebp]
call fcn.00461410
mov dword [ebp - 4], 0xffffffff
jmp 0x4d5b47
mov byte [ebp - 4], 0xa
lea ecx, [ebp + 0xc8]
call fcn.00401210
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x28]
call fcn.00402560
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x24]
call fcn.00402560
mov byte [ebp - 4], 6
lea ecx, [ebp + 0xe4]
call fcn.00401210
mov byte [ebp - 4], 3
lea ecx, [ebp + 0xf0]
call fcn.00401210
mov byte [ebp - 4], 1
lea ecx, [ebp + 0xfc]
call fcn.00401210
jmp 0x4d5b3b