Function at 0x4cff40
Capabilities:
Create directory
Delete file
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x238
mov eax, dword [0x691844]
xor eax, esp
mov dword [esp + 0x234], eax
mov eax, dword [esp + 0x23c]
cmp eax, 0x27
ja case.default.0x4cff64
jmp dword [eax*4 + 0x4d0978]
push 0
mov ecx, 0x6a01d0
call fcn.004c9610
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
push 1
mov ecx, 0x6a01d0
call fcn.004c9610
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
push 2
mov ecx, 0x6a01d0
call fcn.004c9610
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
push 3
mov ecx, 0x6a01d0
call fcn.004c9610
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
push 4
mov ecx, 0x6a01d0
call fcn.004c9610
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
push 5
mov ecx, 0x6a01d0
call fcn.004c9610
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
push 6
mov ecx, 0x6a01d0
call fcn.004c9610
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
push 7
mov ecx, 0x6a01d0
call fcn.004c9610
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
push 8
mov ecx, 0x6a01d0
call fcn.004c9610
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
push 9
mov ecx, 0x6a01d0
call fcn.004c9610
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
mov ecx, dword [0x693900]
push 0
call fcn.00467a10
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
mov ecx, dword [0x693900]
push 1
call fcn.00467a10
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
mov ecx, dword [0x693900]
push 2
call fcn.00467a10
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
mov ecx, dword [0x693900]
push 3
call fcn.00467a10
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
mov ecx, dword [0x6938b4]
push 3
call fcn.004487c0
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
mov ecx, dword [0x6938b4]
push 2
call fcn.004487c0
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
cmp dword [0x6e4488], 2
je case.default.0x4cff64
mov ecx, dword [0x6938b4]
push 4
call fcn.004487c0
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
mov ecx, dword [0x6938b4]
push 7
call fcn.004487c0
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
mov ecx, dword [0x6938b4]
push 5
call fcn.004487c0
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
mov ecx, 0x6830f8
call fcn.004417a0
test eax, eax
jne case.default.0x4cff64
mov ecx, dword [0x6938b4]
push 0xb
call fcn.004487c0
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
mov ecx, dword [0x6938b4]
push 0xa
call fcn.004487c0
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
mov ecx, dword [0x6938b4]
push 8
call fcn.004487c0
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
mov ecx, dword [0x6938b4]
push 9
call fcn.004487c0
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
mov ecx, 0x6853a0
call fcn.004c54b0
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
mov ecx, 0x685878
call fcn.004ccdd0
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
cmp dword [0x6e4488], 2
je case.default.0x4cff64
mov ecx, 0x6a4ae4
call fcn.00523f10
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
mov ecx, dword [0x6938b4]
push 1
call fcn.004487c0
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
mov ecx, dword [0x6938b4]
push 6
call fcn.004487c0
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
mov ecx, 0x6e4470
call fcn.0055dcd0
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
push ebx
push ebp
push esi
push edi
xor ebx, ebx
push ebx
mov ecx, 0x6e4cb0
call fcn.0056c960
push ebx
push str.ScreenShot
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [esp + 0x34]
push eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push ebx
push 0x80
push 3
push ebx
push ebx
push connect
push str.ini_ScreenShot.cnt
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [esp + 0x10], ebx
cmp esi, 0xffffffff
je 0x4d04f4
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
lea ecx, [esp + 0x14]
push ecx
push 2
lea edx, [esp + 0x34]
push edx
push esi
call edi
push ebx
lea eax, [esp + 0x14]
push eax
push 2
lea ecx, [esp + 0x24]
push ecx
push esi
call edi
push ebx
lea edx, [esp + 0x14]
push edx
push 2
lea eax, [esp + 0x38]
push eax
push esi
call edi
push ebx
lea ecx, [esp + 0x14]
push ecx
push 2
lea edx, [esp + 0x28]
push edx
push esi
call edi
push ebx
lea eax, [esp + 0x14]
push eax
push 2
lea ecx, [esp + 0x3c]
push ecx
push esi
call edi
push ebx
lea edx, [esp + 0x14]
push edx
push 2
lea eax, [esp + 0x2c]
push eax
push esi
call edi
push ebx
lea ecx, [esp + 0x14]
push ecx
push 2
lea edx, [esp + 0x30]
push edx
push esi
call edi
push ebx
lea eax, [esp + 0x14]
push eax
push 2
lea ecx, [esp + 0x20]
push ecx
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x28]
mov bx, word [esp + 0x40]
cmp cx, word [0x691890]
jne 0x4d04e6
mov dx, word [esp + 0x34]
cmp dx, word [esp + 0x18]
jne 0x4d04e6
mov ebp, dword [esp + 0x2c]
cmp word [esp + 0x36], bp
jne 0x4d04e6
mov edi, dword [esp + 0x1c]
cmp word [esp + 0x3a], di
jne 0x4d04e6
mov esi, dword [esp + 0x30]
cmp word [esp + 0x3c], si
jne 0x4d04e6
mov edx, dword [esp + 0x20]
cmp word [esp + 0x3e], dx
jne 0x4d04e6
mov eax, dword [esp + 0x24]
cmp bx, ax
je 0x4d053d
movzx eax, word [esp + 0x34]
mov dword [esp + 0x18], eax
movzx eax, bx
jmp 0x4d0502
movzx edx, word [esp + 0x34]
movzx eax, word [esp + 0x40]
mov dword [esp + 0x18], edx
movzx edx, word [esp + 0x3e]
movzx esi, word [esp + 0x3c]
movzx edi, word [esp + 0x3a]
movzx ebp, word [esp + 0x36]
movzx ecx, word [0x691890]
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], edx
mov dword [esp + 0x30], esi
mov dword [esp + 0x14], 1
mov dword [esp + 0x1c], edi
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x28], ecx
movzx ebx, word [esp + 0x14]
push ebx
movzx eax, ax
push eax
movzx edx, dx
push edx
movzx eax, si
push eax
movzx edx, di
push edx
movzx eax, bp
push eax
movzx eax, word [esp + 0x30]
cdq
mov esi, 0x64
idiv esi
mov esi, dword [sym.imp.MSVCR90.dll_sprintf]
movzx ecx, cx
push edx
push ecx
lea edx, [esp + 0x64]
push str.ScreenShot_DarkStory__02d__02d_02d_02d__02d_02d_02d__03d.jpg
push edx
call esi
movzx eax, word [esp + 0x3c]
movzx ecx, word [esp + 0x4c]
movzx edx, word [esp + 0x48]
push eax
movzx eax, word [esp + 0x5c]
push ecx
movzx ecx, word [esp + 0x4c]
push edx
movzx edx, word [esp + 0x60]
push eax
movzx eax, word [esp + 0x50]
push ecx
push edx
cdq
mov ecx, 0x64
idiv ecx
lea eax, [esp + 0x184]
push edx
movzx edx, word [esp + 0x6c]
push edx
push str.ScreenShot_DarkStory__02d__02d_02d_02d__02d_02d_02d__03d.txt
push eax
call esi
mov eax, dword [0x6cb158]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x10]
add esp, 0x50
push eax
call edx
mov ecx, dword [eax]
lea edx, [esp + 0x44]
push edx
push eax
mov eax, dword [ecx + 0xe8]
call eax
test eax, eax
je 0x4d06d1
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push str.ini_ScreenShot.cnt
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4d06ab
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
inc dword [esp + 0x14]
push 0
lea ecx, [esp + 0x14]
push ecx
push 2
lea edx, [esp + 0x34]
push edx
push esi
call edi
push 0
lea eax, [esp + 0x14]
push eax
push 2
lea ecx, [esp + 0x24]
push ecx
push esi
call edi
push 0
lea edx, [esp + 0x14]
push edx
push 2
lea eax, [esp + 0x38]
push eax
push esi
call edi
push 0
lea ecx, [esp + 0x14]
push ecx
push 2
lea edx, [esp + 0x28]
push edx
push esi
call edi
push 0
lea eax, [esp + 0x14]
push eax
push 2
lea ecx, [esp + 0x3c]
push ecx
push esi
call edi
push 0
lea edx, [esp + 0x14]
push edx
push 2
lea eax, [esp + 0x2c]
push eax
push esi
call edi
push 0
lea ecx, [esp + 0x14]
push ecx
push 2
lea edx, [esp + 0x30]
push edx
push esi
call edi
push 0
lea eax, [esp + 0x14]
push eax
push 2
lea ecx, [esp + 0x20]
push ecx
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [esp + 0x44]
push edx
push 0xc9
mov ecx, 0x6a0f60
call fcn.004d6bc0
push eax
push 0x1a
push 0x6a0f60
call fcn.004d8020
add esp, 0x10
jmp 0x4d06f0
push 0xc8
mov ecx, 0x6a0f60
call fcn.004d6bc0
push eax
push 0x1a
push 0x6a0f60
call fcn.004d8020
add esp, 0xc
push 0
lea eax, [esp + 0x48]
push eax
push 0x11
call dword [sym.imp.FreeImage.dll__FreeImage_Load_12]
mov esi, eax
test esi, esi
je 0x4d0748
lea ecx, [esp + 0x44]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [esp + 0x44]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4d0717
sub eax, edx
push 0x80
lea edx, [esp + 0x48]
lea eax, [esp + eax + 0x48]
push edx
push esi
mov byte [eax - 3], 0x6a
mov byte [eax - 2], 0x70
mov byte [eax - 1], 0x67
call dword [sym.imp.FreeImage.dll__FreeImage_SaveJPEG_12]
push esi
call dword [sym.imp.FreeImage.dll__FreeImage_Unload_4]
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
push 1
mov ecx, 0x69e250
call fcn.004a3d80
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
push 0
mov ecx, 0x69e250
call fcn.004a3d80
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
mov eax, dword [0x6938b0]
test eax, eax
je case.default.0x4cff64
mov eax, dword [eax + 0xb440]
test eax, eax
je case.default.0x4cff64
cmp dword [eax + 0x20], 0
je case.default.0x4cff64
push 1
mov ecx, 0x6a0f60
call fcn.004d6dd0
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
mov eax, dword [0x6938b0]
test eax, eax
je case.default.0x4cff64
mov eax, dword [eax + 0xb440]
test eax, eax
je case.default.0x4cff64
cmp dword [eax + 0x20], 0
je case.default.0x4cff64
push 0
mov ecx, 0x6a0f60
call fcn.004d6dd0
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
cmp dword [0x6e4488], 2
je case.default.0x4cff64
mov ecx, dword [0x693968]
test ecx, ecx
je case.default.0x4cff64
mov eax, dword [ecx]
mov eax, dword [eax + 8]
xor edx, edx
cmp dword [ecx + 0x10], edx
sete dl
push edx
call eax
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
mov eax, dword [0x69e254]
cmp dword [eax + 0x31c], 0
jne case.default.0x4cff64
cmp dword [eax + 0x404], 0
jne case.default.0x4cff64
mov ecx, 0x68dfb0
call fcn.00512860
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
cmp dword [0x6e4488], 4
je case.default.0x4cff64
mov ecx, dword [0x693ab4]
mov edx, dword [ecx]
mov eax, dword [edx + 8]
push 0
call eax
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
mov eax, dword [0x6e4488]
cmp eax, 2
je case.default.0x4cff64
cmp eax, 4
je case.default.0x4cff64
mov cx, word [ecx + 0xc84]
mov edx, dword [0x693ab4]
mov word [edx + 0x2dc], cx
mov ecx, dword [0x693ab4]
mov eax, dword [ecx]
mov edx, dword [eax + 8]
push 1
call edx
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4
mov ecx, dword [0x69e254]
mov eax, 1
cmp dword [ecx + 0x404], eax
jne case.default.0x4cff64
mov ecx, dword [0x693898]
mov edx, dword [ecx]
cmp dword [ecx + 0x10], eax
je 0x4d08c4
push eax
mov eax, dword [edx + 8]
call eax
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.005997a8
add esp, 0x238
ret 4