Function at 0x405610
Capabilities:
Delete file
Enumerate files on windows
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x888
mov eax, dword [0x643004]
xor eax, esp
mov dword [esp + 0x884], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [esp + 0x174]
push edi
mov edi, dword [ebp + 0x10]
push 0x104
push eax
push esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [esp + 0x178]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
lea ecx, [esp + 0x178]
dec ecx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x405664
mov eax, dword [str.dllPAL.dll]
mov dword [ecx], eax
mov eax, dword [0x62774c]
mov dword [ecx + 4], eax
mov eax, dword [0x627750]
mov dword [ecx + 8], eax
mov al, byte [0x627754]
push 8
mov byte [ecx + 0xc], al
lea eax, [esp + 0x17c]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
test eax, eax
je 0x4056dd
mov ecx, esi
call fcn.00404d10
test eax, eax
je 0x4056dd
push 0x6529a0
push 1
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
mov dword [0x652780], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4056f8
push dword [0x652780]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
pop edi
pop esi
mov ecx, dword [esp + 0x884]
xor ecx, esp
call fcn.00482be9
mov esp, ebp
pop ebp
ret 0x10
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.PAL.dll_PalDefaultCreate]
add esp, 4
mov dword [esp + 0x18], esi
xorps xmm0, xmm0
mov dword [esp + 0x64], 0x404b80
lea eax, [esp + 0x178]
movaps xmmword [esp + 0x130], xmm0
movq qword [esp + 0x140], xmm0
push str.system.dat
push 0x652ba8
push str._s_s
push eax
mov dword [esp + 0x158], 0
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [esp + 0x280]
push eax
lea eax, [esp + 0x17c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x40578a
mov esi, dword [esp + 0x280]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
and esi, 0x10
jne 0x405786
xor eax, eax
jmp 0x4058fd
mov esi, dword [esp + 0xc]
xorps xmm0, xmm0
push 0x7f00
movaps xmmword [esp + 0x94], xmm0
movaps xmmword [esp + 0xa4], xmm0
movq qword [esp + 0xb4], xmm0
push 0
mov dword [esp + 0xa8], esi
mov dword [esp + 0xbc], 0x6529a0
mov dword [esp + 0x9c], 0x44b400
mov dword [esp + 0x98], 3
call dword [sym.imp.USER32.dll_LoadCursorA]
push 0x7f00
push 0
mov dword [esp + 0xb0], eax
call dword [sym.imp.USER32.dll_LoadIconA]
push 5
mov dword [esp + 0xa8], eax
mov dword [esp + 0xa0], 0x1e
call dword [sym.imp.GDI32.dll_GetStockObject]
mov dword [esp + 0xac], eax
lea eax, [esp + 0x90]
push eax
call dword [sym.imp.USER32.dll_RegisterClassA]
test ax, ax
jne 0x40582a
xor eax, eax
jmp 0x4058fd
push 0x96
lea eax, [esp + 0x14]
push 0x12c
push eax
call dword [sym.imp.PAL.dll_PalWindowGetPosCenter]
add esp, 0xc
push 0
push esi
push 0
push 0
push 0x96
push 0x12c
push dword [esp + 0x2c]
push dword [esp + 0x2c]
push 0x400000
push 0x6529a0
push 0x6529a0
push 8
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov esi, eax
test esi, esi
je 0x4058fd
push 5
push esi
call dword [sym.imp.USER32.dll_ShowWindow]
push esi
call dword [sym.imp.USER32.dll_UpdateWindow]
mov edi, dword [sym.imp.USER32.dll_PeekMessageA]
push 1
push 0
push 0
push 0
lea eax, [esp + 0x140]
push eax
call edi
test eax, eax
je 0x405892
lea eax, [esp + 0x130]
push eax
push esi
call dword [sym.imp.USER32.dll_IsDialogMessageA]
test eax, eax
jne 0x405892
cmp dword [esp + 0x134], 0x12
je 0x4058e3
lea eax, [esp + 0x130]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x130]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
jmp 0x405892
push dword [esp + 0xc]
push 0x6529a0
call dword [sym.imp.USER32.dll_UnregisterClassA]
mov eax, dword [esp + 0x138]
mov edi, dword [esp + 8]
mov dword [esp + 0x1c], eax
mov eax, dword [0x652784]
cmp eax, 1
jne 0x405930
mov dword [esp + 0x48], 0x320
mov dword [esp + 0x4c], 0x258
mov dword [esp + 0x50], 0x320
mov dword [esp + 0x54], 0x258
jmp 0x4059f8
cmp eax, 2
je 0x4059d8
cmp eax, 3
jne 0x405963
mov dword [esp + 0x48], 0x780
mov dword [esp + 0x4c], 0x438
mov dword [esp + 0x50], 0x780
mov dword [esp + 0x54], 0x438
jmp 0x4059f8
cmp eax, 4
jne 0x40598a
mov dword [esp + 0x48], 0xa00
mov dword [esp + 0x4c], 0x5a0
mov dword [esp + 0x50], 0xa00
mov dword [esp + 0x54], 0x5a0
jmp 0x4059f8
cmp eax, 5
jne 0x4059b1
mov dword [esp + 0x48], 0xf00
mov dword [esp + 0x4c], 0x870
mov dword [esp + 0x50], 0xf00
mov dword [esp + 0x54], 0x870
jmp 0x4059f8
cmp eax, 6
jne 0x4059d8
mov dword [esp + 0x48], 0x1e00
mov dword [esp + 0x4c], 0x10e0
mov dword [esp + 0x50], 0x1e00
mov dword [esp + 0x54], 0x10e0
jmp 0x4059f8
mov dword [esp + 0x48], 0x500
mov dword [esp + 0x4c], 0x2d0
mov dword [esp + 0x50], 0x500
mov dword [esp + 0x54], 0x2d0
push 0x208
lea eax, [esp + 0x284]
mov dword [esp + 0x40], 0x3c
push 0
push eax
mov dword [esp + 0x64], 0x5ff
mov dword [esp + 0x68], 0x5ff
mov dword [esp + 0x30], 0x6529a0
mov dword [esp + 0x34], 0x6529a0
mov dword [esp + 0x38], 0x65
mov dword [esp + 0x2c], 0
call fcn.00484a00
add esp, 0xc
lea eax, [esp + 0x280]
push 0x652ba8
push str._sconfig.dat
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [esp + 0x280]
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x405b5e
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
je 0x405b5e
push 0
lea eax, [esp + 0xc]
push eax
push 0x24
lea eax, [esp + 0x13c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 8], 0x24
jne 0x405b5e
mov eax, dword [esp + 0x130]
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x134]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x138]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x13c]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x140]
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0x148]
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 0x14c]
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x144]
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x150]
push 0x22
mov dword [esp + 0x84], eax
call esi
mov ecx, dword [esp + 0x48]
mov edx, 0x500
cmp ecx, eax
push 0x23
cmovl ecx, edx
mov dword [esp + 0x4c], ecx
call esi
cmp dword [esp + 0x4c], eax
jge 0x405b6e
mov dword [esp + 0x4c], 0x2d0
jmp 0x405b6e
lea edx, [esp + 0x18]
lea ecx, [esp + 0x280]
call fcn.0044b890
push 0x627758
push edi
call fcn.00484300
mov esi, eax
add esp, 8
test esi, esi
je 0x405c22
push 3
inc esi
push 0x62775c
push esi
call fcn.0048d3d0
add esp, 0xc
test eax, eax
jne 0x405baf
mov eax, dword [esp + 0x74]
not eax
or eax, 8
add esi, 3
not eax
mov dword [esp + 0x74], eax
jmp 0x405c0a
push 2
push 0x627760
push esi
call fcn.0048d3d0
add esp, 0xc
test eax, eax
jne 0x405bc9
mov dword [esp + 0x78], eax
jmp 0x405c07
push 2
push 0x627764
push esi
call fcn.0048d3d0
add esp, 0xc
test eax, eax
jne 0x405bee
mov eax, dword [esp + 0x74]
not eax
or eax, 1
not eax
mov dword [esp + 0x74], eax
jmp 0x405c07
push 2
push 0x627768
push esi
call fcn.0048d3d0
add esp, 0xc
test eax, eax
jne 0x405c0a
or dword [esp + 0x74], 8
add esi, 2
push 0x627758
push esi
call fcn.00484300
mov esi, eax
add esp, 8
test esi, esi
jne 0x405b86
lea eax, [esp + 0x18]
mov dword [0x64c2d0], 1
push eax
call dword [sym.imp.PAL.dll_PalInit]
add esp, 4
test eax, eax
je 0x405ed5
xor ecx, ecx
call fcn.0044bf00
push str.system.dat
push 0x652ba8
lea eax, [esp + 0x180]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov edi, dword [sym.imp.PAL.dll_PalFileCreate]
lea eax, [esp + 0x17c]
push eax
lea eax, [esp + 0x18c]
push eax
call edi
mov esi, eax
add esp, 0x18
cmp esi, 0xffffffff
je 0x405d1a
push 1
push 0
push 2
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [esp + 0xc]
push eax
push 4
lea eax, [esp + 0x98]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x16c]
push eax
push str.Script.src
call edi
mov esi, eax
add esp, 8
cmp esi, 0xffffffff
je 0x405f03
mov ecx, dword [esp + 0x16c]
push 0
push 0
add ecx, 4
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [esp + 0xc]
push eax
push 4
lea eax, [esp + 0x1c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov eax, dword [esp + 0x8c]
cmp eax, dword [esp + 0x10]
jne 0x405f09
push str.User32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [0x652dbc], eax
test eax, eax
je 0x405d42
push str.GetProductInfo
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x652dc0], eax
call dword [sym.imp.PAL.dll_PalDebugIs]
test eax, eax
je 0x405d51
call fcn.00404540
call dword [sym.imp.PAL.dll_PalRun]
push 0x208
lea eax, [esp + 0x284]
push 0
push eax
call fcn.00484a00
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [esp + 0x28c]
add esp, 0xc
push 0x652ba8
push str._sconfig.dat
push eax
call edi
add esp, 0xc
lea eax, [esp + 0x280]
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x405eab
lea eax, [esp + 0xc0]
push eax
call dword [sym.imp.PAL.dll_PalGetSystemParameters]
mov eax, dword [esp + 0xec]
add esp, 4
mov ecx, dword [esp + 0x11c]
mov dword [esp + 0x130], eax
or ecx, 8
mov eax, dword [esp + 0xec]
mov dword [esp + 0x134], eax
mov eax, dword [esp + 0xf0]
mov dword [esp + 0x138], eax
mov eax, dword [esp + 0xf4]
mov dword [esp + 0x13c], eax
mov eax, dword [esp + 0x124]
mov dword [esp + 0x148], eax
mov eax, dword [esp + 0x120]
mov dword [esp + 0x14c], eax
mov eax, dword [esp + 0x114]
mov dword [esp + 0x144], eax
mov eax, dword [esp + 0x128]
push 0
mov dword [esp + 0x154], eax
lea eax, [esp + 0x14]
push eax
push 0x24
lea eax, [esp + 0x13c]
mov dword [esp + 0x128], ecx
push eax
push esi
mov dword [esp + 0x154], ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x405ea4
lea eax, [esp + 0x280]
push eax
lea eax, [esp + 0x48c]
push 0x62c608
push eax
call edi
add esp, 0xc
lea eax, [esp + 0x488]
push 0x40030
push 0x62c630
push eax
call dword [sym.imp.USER32.dll_GetActiveWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.PAL.dll_PalUninit]
mov eax, dword [0x652dbc]
test eax, eax
je 0x405ec1
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x652dbc], 0
mov dword [0x652dc0], 0
push dword [0x652780]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x652780], 0
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x884]
xor ecx, esp
call fcn.00482be9
mov esp, ebp
pop ebp
ret 0x10
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x40024
push 0x62776c
push 0x627778
call dword [sym.imp.USER32.dll_GetActiveWindow]
mov edi, dword [sym.imp.USER32.dll_MessageBoxA]
push eax
call edi
cmp eax, 6
jne 0x4060d0
push 0x652ba8
lea eax, [esp + 0x17c]
push str._s.
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [esp + 0x280]
push eax
lea eax, [esp + 0x17c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [esp + 8], eax
cmp eax, 0xffffffff
je 0x4060b8
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov esi, eax
nop word [eax + eax]
mov ecx, 0x62c644
lea eax, [esp + 0x2ac]
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x405fb0
test dl, dl
je 0x405fac
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x405fb0
add eax, 2
add ecx, 2
test dl, dl
jne 0x405f90
xor eax, eax
jmp 0x405fb5
sbb eax, eax
or eax, 1
test eax, eax
je 0x406095
mov ecx, 0x62c648
lea eax, [esp + 0x2ac]
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x405ff0
test dl, dl
je 0x405fec
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x405ff0
add eax, 2
add ecx, 2
test dl, dl
jne 0x405fd0
xor eax, eax
jmp 0x405ff5
sbb eax, eax
or eax, 1
test eax, eax
je 0x406095
test byte [esp + 0x280], 0x10
jne 0x406095
lea eax, [esp + 0x2ac]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
sub eax, 4
lea esi, [esp + 0x2ac]
add esi, eax
mov eax, dword [esi]
cmp eax, 0x7461642e
jne 0x40605d
lea eax, [esp + 0x2ac]
push eax
push 0x652ba8
lea eax, [esp + 0x180]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [esp + 0x178]
push eax
call edi
mov eax, dword [esi]
cmp eax, 0x67706a2e
jne 0x406091
lea eax, [esp + 0x2ac]
push eax
push 0x652ba8
lea eax, [esp + 0x180]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [esp + 0x178]
push eax
call edi
mov esi, dword [esp + 8]
lea eax, [esp + 0x280]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x405f80
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x405d1a
push 0x40020
push 0x6277cc
push 0x6277dc
call dword [sym.imp.USER32.dll_GetActiveWindow]
push eax
call edi
call dword [sym.imp.PAL.dll_PalUninit]
push dword [0x652780]
call esi
mov ecx, dword [esp + 0x88c]
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.00482be9
mov esp, ebp
pop ebp
ret 0x10