Function at 0x4780a0
Capabilities:
Delete file
Get common file path
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5215f0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x238
mov eax, dword [0x53c1a0]
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], edi
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x38]
push edx
push eax
mov ecx, dword [eax]
mov dword [ebp - 0x30], edi
mov byte [ebp - 4], 4
mov dword [ebp - 0x38], edi
call dword [ecx + 0x78]
mov eax, dword [ebp - 0x38]
cmp eax, edi
jne 0x478195
mov eax, dword [ebp - 0x24]
mov edx, dword [0x53c120]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x478136
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x47813c
mov edx, dword [ebp - 0x24]
add edx, 0xfffffff4
push edx
call fcn.0051e1fa
add esp, 4
jmp 0x47813c
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov eax, dword [ebp - 0x28]
mov edx, dword [0x53c120]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x478165
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x478165
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff4
push edx
call fcn.0051e1fa
add esp, 4
mov eax, dword [ebp - 0x14]
mov edx, dword [0x53c120]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x47818e
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x47818e
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff4
push edx
call fcn.0051e1fa
add esp, 4
xor eax, eax
jmp 0x478a32
push eax
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
lea ecx, [ebp - 0x24]
call fcn.00439940
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov ecx, dword [0x53c1a0]
mov edx, 0x564fc8
test edx, edx
mov dword [ebp - 0x20], ecx
je 0x478216
mov eax, edx
shr eax, 0x10
jne 0x4781db
xor eax, eax
mov ecx, edx
mov ax, cx
lea ecx, [ebp - 0x20]
push eax
call fcn.0041d220
jmp 0x478216
push 0x564fc8
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
cmp esi, edi
je 0x478216
push esi
lea ecx, [ebp - 0x20]
call fcn.00405040
cmp eax, edi
je 0x478216
mov edx, dword [ebp - 0x20]
inc esi
push esi
push 0x564fc8
push edx
call fcn.004500e0
add esp, 0xc
lea ecx, [ebp - 0x20]
push 0xffffffffffffffff
call fcn.0041d450
lea eax, [ebp - 0x18]
push 5
push eax
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 5
call fcn.004797d0
mov ecx, dword [ebp - 0x20]
mov eax, dword [eax]
push ecx
push eax
call dword [sym.imp.MSVCRT.dll_wcscmp]
mov ecx, dword [0x53c120]
add esp, 8
test eax, eax
mov eax, dword [ebp - 0x18]
sete bl
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x47826e
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x478274
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff4
push eax
call fcn.0051e1fa
add esp, 4
jmp 0x478274
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov eax, dword [ebp - 0x20]
mov edx, dword [0x53c120]
mov byte [ebp - 4], 4
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4782a1
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x4782a1
mov edx, dword [ebp - 0x20]
lea eax, [edx - 0xc]
push eax
call fcn.0051e1fa
add esp, 4
test bl, bl
je 0x4782e4
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x24]
cmp eax, ecx
mov dword [ebp - 0x30], 1
je 0x478357
mov edx, dword [eax - 0xc]
test edx, edx
jge 0x4782ce
mov edx, dword [0x53c120]
add eax, 0xfffffff4
cmp eax, edx
jne 0x4782d5
mov eax, dword [ecx - 0xc]
test eax, eax
jge 0x47833f
push ecx
mov ecx, dword [ecx - 8]
push ecx
lea ecx, [ebp - 0x14]
call fcn.00439940
jmp 0x478357
mov eax, 0x564fb4
test eax, eax
je 0x4782f8
push 0x564fb4
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0x564fb4
push eax
lea ecx, [ebp - 0x14]
call fcn.00439940
mov edx, dword [0x53c1a0]
mov eax, 0x564fc8
test eax, eax
mov dword [ebp - 0x18], edx
je 0x47844f
mov ecx, eax
shr ecx, 0x10
jne 0x478414
xor eax, eax
mov edx, 0x564fc8
mov ax, dx
lea ecx, [ebp - 0x18]
push eax
call fcn.0041d220
jmp 0x47844f
lea ecx, [ebp - 0x14]
call fcn.00405240
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x14], eax
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
lea edx, [ebp - 0x18]
push 8
push edx
lea ecx, [ebp - 0x14]
call fcn.00477bd0
mov esi, eax
mov eax, dword [esi]
mov ecx, dword [ebp - 0x14]
cmp ecx, eax
mov byte [ebp - 4], 6
je 0x4783b5
mov edx, dword [ecx - 0xc]
test edx, edx
jge 0x478388
mov edx, dword [0x53c120]
add ecx, 0xfffffff4
cmp ecx, edx
jne 0x47838f
mov ecx, dword [eax - 0xc]
test ecx, ecx
jge 0x47839e
push eax
mov eax, dword [eax - 8]
push eax
lea ecx, [ebp - 0x14]
call fcn.00439940
jmp 0x4783b5
lea ecx, [ebp - 0x14]
call fcn.00405240
mov eax, dword [esi]
mov dword [ebp - 0x14], eax
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [ebp - 0x18]
mov edx, dword [0x53c120]
mov byte [ebp - 4], 4
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4783e2
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x4783e2
mov edx, dword [ebp - 0x18]
lea eax, [edx - 0xc]
push eax
call fcn.0051e1fa
add esp, 4
lea ecx, [ebp - 0x14]
xor ebx, ebx
call fcn.00450010
mov eax, dword [ebp - 0x14]
mov edi, dword [sym.imp.USER32.dll_CharNextW]
mov ecx, dword [eax - 8]
lea esi, [eax + ecx*2]
cmp eax, esi
jae 0x478306
cmp word [eax], 0x2f
jne 0x47840f
mov word [eax], 0x5c
inc ebx
push eax
call edi
jmp 0x4783fb
push 0x564fc8
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
test esi, esi
je 0x47844f
push esi
lea ecx, [ebp - 0x18]
call fcn.00405040
test eax, eax
je 0x47844f
mov eax, dword [ebp - 0x18]
inc esi
push esi
push 0x564fc8
push eax
call fcn.004500e0
add esp, 0xc
lea ecx, [ebp - 0x18]
push 0xffffffffffffffff
call fcn.0041d450
lea ecx, [ebp - 0x1c]
push 5
push ecx
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 7
call fcn.004797d0
mov edx, dword [ebp - 0x18]
mov eax, dword [eax]
mov edi, dword [sym.imp.MSVCRT.dll_wcscmp]
push edx
push eax
mov byte [ebp - 4], 8
call edi
add esp, 8
test eax, eax
je 0x47856b
mov eax, dword [0x53c1a0]
mov ecx, 0x564fac
test ecx, ecx
mov dword [ebp - 0x20], eax
je 0x4784e2
mov edx, ecx
shr edx, 0x10
jne 0x4784a7
xor eax, eax
mov ax, cx
lea ecx, [ebp - 0x20]
push eax
call fcn.0041d220
jmp 0x4784e2
push 0x564fac
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
test esi, esi
je 0x4784e2
push esi
lea ecx, [ebp - 0x20]
call fcn.00405040
test eax, eax
je 0x4784e2
mov edx, dword [ebp - 0x20]
inc esi
push esi
push 0x564fac
push edx
call fcn.004500e0
add esp, 0xc
lea ecx, [ebp - 0x20]
push 0xffffffffffffffff
call fcn.0041d450
lea eax, [ebp - 0x2c]
push 5
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 9
call fcn.004797d0
mov ecx, dword [ebp - 0x20]
mov eax, dword [eax]
push ecx
push eax
call edi
mov ecx, dword [0x53c120]
add esp, 8
test eax, eax
mov eax, dword [ebp - 0x2c]
sete bl
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x478536
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x47853c
mov eax, dword [ebp - 0x2c]
add eax, 0xfffffff4
push eax
call fcn.0051e1fa
add esp, 4
jmp 0x47853c
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov eax, dword [ebp - 0x20]
mov edx, dword [0x53c120]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x478565
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x478565
mov edx, dword [ebp - 0x20]
lea eax, [edx - 0xc]
push eax
call fcn.0051e1fa
add esp, 4
test bl, bl
jne 0x478571
jmp 0x478573
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov bl, 1
mov eax, dword [ebp - 0x1c]
mov edx, dword [0x53c120]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x47859c
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x47859c
mov edx, dword [ebp - 0x1c]
lea eax, [edx - 0xc]
push eax
call fcn.0051e1fa
add esp, 4
mov eax, dword [ebp - 0x18]
mov edx, dword [0x53c120]
mov byte [ebp - 4], 4
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4785c9
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x4785c9
mov edx, dword [ebp - 0x18]
lea eax, [edx - 0xc]
push eax
call fcn.0051e1fa
add esp, 4
test bl, bl
je 0x47871f
mov eax, dword [0x53c1a0]
mov ecx, 0x564fa8
test ecx, ecx
mov dword [ebp - 0x18], eax
je 0x478634
mov edx, ecx
shr edx, 0x10
jne 0x4785f9
xor eax, eax
mov ax, cx
lea ecx, [ebp - 0x18]
push eax
call fcn.0041d220
jmp 0x478634
push 0x564fa8
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
test esi, esi
je 0x478634
push esi
lea ecx, [ebp - 0x18]
call fcn.00405040
test eax, eax
je 0x478634
mov edx, dword [ebp - 0x18]
inc esi
push esi
push 0x564fa8
push edx
call fcn.004500e0
add esp, 0xc
lea ecx, [ebp - 0x18]
push 0xffffffffffffffff
call fcn.0041d450
lea eax, [ebp - 0x1c]
push 1
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0xa
call fcn.00479920
mov ecx, dword [ebp - 0x18]
mov eax, dword [eax]
push ecx
push eax
call dword [sym.imp.MSVCRT.dll_wcscmp]
mov ecx, dword [0x53c120]
add esp, 8
test eax, eax
mov eax, dword [ebp - 0x1c]
sete bl
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x478684
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x478684
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff4
push eax
call fcn.0051e1fa
add esp, 4
mov eax, dword [ebp - 0x18]
mov edx, dword [0x53c120]
mov byte [ebp - 4], 4
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4786b1
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x4786b1
mov edx, dword [ebp - 0x18]
lea eax, [edx - 0xc]
push eax
call fcn.0051e1fa
add esp, 4
test bl, bl
je 0x4786e2
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x1c]
mov eax, dword [eax - 8]
dec eax
push eax
push ecx
lea ecx, [ebp - 0x14]
call fcn.004797d0
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0xb
call fcn.004419f0
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 4
call fcn.004faf90
push 0x2f
lea ecx, [ebp - 0x14]
call fcn.00479b70
inc eax
lea edx, [ebp - 0x1c]
push eax
push edx
lea ecx, [ebp - 0x14]
call fcn.00477bd0
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0xc
call fcn.004419f0
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 4
call fcn.004faf90
push 0x5f
push 0x3a
lea ecx, [ebp - 0x14]
call fcn.00479a90
lea eax, [ebp - 0x14]
lea ecx, [ebp - 0x28]
push eax
call fcn.004419f0
mov eax, dword [ebp - 0x30]
test eax, eax
jne 0x4787f4
push 0x564fa0
lea ecx, [ebp - 0x14]
call fcn.0044fd40
push 0x564f98
lea ecx, [ebp - 0x28]
call fcn.0044fd40
lea ecx, [ebp - 0x244]
push ecx
push 0xff
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea edx, [ebp - 0x244]
lea ecx, [ebp - 0x1c]
push edx
call fcn.0043e320
lea eax, [ebp - 0x14]
lea ecx, [ebp - 0x1c]
push eax
lea edx, [ebp - 0x2c]
mov bl, 0xd
push ecx
push edx
mov byte [ebp - 4], bl
call fcn.00441e60
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0xe
call fcn.004419f0
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], bl
call fcn.004faf90
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 4
call fcn.004faf90
lea eax, [ebp - 0x244]
lea ecx, [ebp - 0x1c]
push eax
call fcn.0043e320
lea ecx, [ebp - 0x28]
lea edx, [ebp - 0x1c]
push ecx
lea eax, [ebp - 0x2c]
mov bl, 0xf
push edx
push eax
mov byte [ebp - 4], bl
call fcn.00441e60
push eax
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0x10
call fcn.004419f0
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], bl
call fcn.004faf90
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 4
call fcn.004faf90
push 0x2f
lea ecx, [ebp - 0x24]
call fcn.00479b70
inc eax
lea ecx, [ebp - 0x1c]
push eax
push ecx
lea ecx, [ebp - 0x24]
call fcn.004797d0
push eax
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 0x11
call fcn.004419f0
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 4
call fcn.004faf90
mov eax, dword [ebp - 0x30]
mov dword [ebp - 4], 3
test eax, eax
jne 0x4789e1
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov esi, eax
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x34]
mov dword [ebp - 0x2c], esi
mov ecx, dword [eax]
push edx
push eax
mov byte [ebp - 4], 0x13
call dword [ecx + 0x48]
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x4788a2
mov ecx, dword [eax]
lea edx, [ebp - 0x40]
push edx
push str._D_3
push eax
call dword [ecx]
test eax, eax
jl 0x4788a2
mov eax, dword [ebp - 0x34]
lea edx, [ebp - 0x3c]
push edx
push 0x52e1a0
mov ecx, dword [eax]
push eax
call dword [ecx]
test eax, eax
jl 0x4788a2
mov eax, dword [ebp - 0x3c]
push 0
push esi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x18]
jmp 0x4788a2
mov dword [ebp - 4], 3
push esi
mov byte [ebp - 4], 0x15
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x4788c1
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x4788ce
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x4788db
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [ebp - 0x14]
mov edi, dword [sym.imp.MSVCRT.dll__wfopen]
push 0x55d158
push eax
mov dword [ebp - 4], 3
call edi
mov ecx, dword [ebp - 0x28]
push 0x55d14c
push ecx
mov esi, eax
call edi
add esp, 0x10
mov edi, eax
test esi, esi
mov dword [ebp + 8], edi
je 0x4789c9
test edi, edi
je 0x4789bf
mov ebx, dword [sym.imp.MSVCRT.dll_fputs]
push edi
push 0x564f88
call ebx
mov eax, dword [ebp - 0x24]
add esp, 8
test eax, eax
mov dword [ebp - 0x2c], eax
jne 0x47893b
jmp 0x478961
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and al, 0xfc
call fcn.0051e250
mov edx, dword [ebp - 0x2c]
mov eax, esp
push 0
push edi
push edx
push eax
call fcn.004797a0
mov edi, dword [ebp + 8]
push edi
push eax
call ebx
push edi
push 0x564f84
call ebx
mov ebx, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push 0
push esi
call ebx
push esi
call dword [sym.imp.MSVCRT.dll_ftell]
push 0
push 0
push esi
mov edi, eax
call ebx
push edi
call dword [sym.imp.MSVCRT.dll_malloc]
push esi
mov ebx, eax
push 1
push edi
push ebx
call dword [sym.imp.MSVCRT.dll_fread]
mov eax, dword [ebp + 8]
add esp, 0x40
push eax
push 1
push edi
push ebx
call dword [sym.imp.MSVCRT.dll_fwrite]
push ebx
call dword [sym.imp.MSVCRT.dll_free]
mov edi, dword [ebp + 8]
add esp, 0x14
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
test edi, edi
je 0x4789d7
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edx, dword [ebp - 0x28]
mov byte [ebp - 4], 0x17
push edx
call fcn.00477f80
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x30]
add esp, 4
test eax, eax
jne 0x478a05
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0x24]
mov dword [ebp - 4], 1
call fcn.004faf90
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0
call fcn.004faf90
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call fcn.004faf90
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0xc]
lea esp, [ebp - 0x250]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret