Function at 0x4c0ba0
Capabilities:
Create directory
Delete file
Read file on windows
Resolve function by parsing pe exports
Write file on windows

Disassembly:
sub esp, 0x244
mov eax, dword [0x6a1068]
xor eax, esp
mov dword [esp + 0x240], eax
mov eax, dword [esp + 0x248]
cmp eax, 0x28
ja case.default.0x4c0bc7
push ebx
push esi
push edi
jmp dword [eax*4 + 0x4c14b0]
push 0
mov ecx, 0x6b20a8
call fcn.004bae70
jmp case.0x4c0bc7.20
push 1
mov ecx, 0x6b20a8
call fcn.004bae70
jmp case.0x4c0bc7.20
push 2
mov ecx, 0x6b20a8
call fcn.004bae70
jmp case.0x4c0bc7.20
push 3
mov ecx, 0x6b20a8
call fcn.004bae70
jmp case.0x4c0bc7.20
push 4
mov ecx, 0x6b20a8
call fcn.004bae70
jmp case.0x4c0bc7.20
push 5
mov ecx, 0x6b20a8
call fcn.004bae70
jmp case.0x4c0bc7.20
push 6
mov ecx, 0x6b20a8
call fcn.004bae70
jmp case.0x4c0bc7.20
push 7
mov ecx, 0x6b20a8
call fcn.004bae70
jmp case.0x4c0bc7.20
push 8
mov ecx, 0x6b20a8
call fcn.004bae70
jmp case.0x4c0bc7.20
push 9
mov ecx, 0x6b20a8
call fcn.004bae70
jmp case.0x4c0bc7.20
mov ecx, dword [0x6a3328]
push 0
call fcn.004641e0
jmp case.0x4c0bc7.20
mov ecx, dword [0x6a3328]
push 1
call fcn.004641e0
jmp case.0x4c0bc7.20
mov ecx, dword [0x6a3328]
push 2
call fcn.004641e0
jmp case.0x4c0bc7.20
mov ecx, dword [0x6a3328]
push 3
call fcn.004641e0
jmp case.0x4c0bc7.20
mov ecx, dword [0x6a32dc]
push 3
call fcn.00448b90
jmp case.0x4c0bc7.20
mov ecx, dword [0x6a32dc]
push 2
call fcn.00448b90
jmp case.0x4c0bc7.20
mov ecx, dword [0x6a32dc]
push 4
call fcn.00448b90
jmp case.0x4c0bc7.20
mov ecx, dword [0x6a32dc]
push 7
call fcn.00448b90
jmp case.0x4c0bc7.20
mov ecx, dword [0x6a32dc]
push 5
call fcn.00448b90
jmp case.0x4c0bc7.20
mov ecx, 0x6b0860
call fcn.0043f440
test eax, eax
jne case.0x4c0bc7.20
mov ecx, dword [0x6a32dc]
push 0xb
call fcn.00448b90
jmp case.0x4c0bc7.20
mov ecx, dword [0x6a32dc]
push 0xa
call fcn.00448b90
jmp case.0x4c0bc7.20
mov ecx, dword [0x6a32dc]
push 8
call fcn.00448b90
jmp case.0x4c0bc7.20
mov ecx, dword [0x6a32dc]
push 9
call fcn.00448b90
jmp case.0x4c0bc7.20
mov ecx, 0x6b22f8
call fcn.004be0c0
jmp case.0x4c0bc7.20
mov ecx, 0x6c0ff4
call fcn.00513460
jmp case.0x4c0bc7.20
mov ecx, dword [0x6a32dc]
push 1
call fcn.00448b90
jmp case.0x4c0bc7.20
mov ecx, dword [0x6a32dc]
push 6
call fcn.00448b90
jmp case.0x4c0bc7.20
mov ecx, 0x6ddd30
call fcn.005406f0
jmp case.0x4c0bc7.20
push ebp
xor ebx, ebx
push ebx
mov ecx, 0x6de658
call fcn.0054d220
push ebx
push str.ScreenShot
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [esp + 0x40]
push eax
mov dword [esp + 0x38], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push ebx
push 0x80
push 3
push ebx
push ebx
push 0x80000000
push str.ini_ScreenShot.cnt
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [esp + 0x10], ebx
cmp esi, 0xffffffff
je 0x4c0f21
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
lea ecx, [esp + 0x14]
push ecx
push 2
lea edx, [esp + 0x40]
push edx
push esi
call edi
push ebx
lea eax, [esp + 0x14]
push eax
push 2
lea ecx, [esp + 0x2c]
push ecx
push esi
call edi
push ebx
lea edx, [esp + 0x14]
push edx
push 2
lea eax, [esp + 0x34]
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 + 0x3c]
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 + 0x24]
push ecx
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x34]
mov bx, word [esp + 0x4c]
cmp cx, word [0x6a27a4]
jne 0x4c0f13
mov dx, word [esp + 0x40]
cmp dx, word [esp + 0x20]
jne 0x4c0f13
mov ebp, dword [esp + 0x28]
cmp word [esp + 0x42], bp
jne 0x4c0f13
mov edi, dword [esp + 0x24]
cmp word [esp + 0x46], di
jne 0x4c0f13
mov esi, dword [esp + 0x30]
cmp word [esp + 0x48], si
jne 0x4c0f13
mov edx, dword [esp + 0x2c]
cmp word [esp + 0x4a], dx
jne 0x4c0f13
mov eax, dword [esp + 0x1c]
cmp bx, ax
je 0x4c0f6a
movzx eax, word [esp + 0x40]
mov dword [esp + 0x20], eax
movzx eax, bx
jmp 0x4c0f2f
movzx edx, word [esp + 0x40]
movzx eax, word [esp + 0x4c]
mov dword [esp + 0x20], edx
movzx edx, word [esp + 0x4a]
movzx esi, word [esp + 0x48]
movzx edi, word [esp + 0x46]
movzx ebp, word [esp + 0x42]
movzx ecx, word [0x6a27a4]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], esi
mov dword [esp + 0x18], 1
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], ebp
mov dword [esp + 0x34], ecx
movzx ebx, word [esp + 0x18]
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 + 0x38]
cdq
mov esi, 0x64
idiv esi
movzx ecx, cx
push edx
push ecx
lea edx, [esp + 0x70]
push str.ScreenShot_DarkStory__02d__02d_02d_02d__02d_02d_02d__03d.jpg
push edx
call fcn.00565b90
movzx eax, word [esp + 0x40]
movzx ecx, word [esp + 0x44]
movzx edx, word [esp + 0x54]
push eax
movzx eax, word [esp + 0x5c]
push ecx
movzx ecx, word [esp + 0x54]
push edx
movzx edx, word [esp + 0x5c]
push eax
movzx eax, word [esp + 0x58]
push ecx
push edx
cdq
mov ecx, esi
idiv ecx
lea eax, [esp + 0x190]
push edx
movzx edx, word [esp + 0x78]
push edx
push str.ScreenShot_DarkStory__02d__02d_02d_02d__02d_02d_02d__03d.txt
push eax
call fcn.00565b90
mov eax, dword [0x6dbb54]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x10]
add esp, 0x50
push eax
call edx
mov ecx, dword [eax]
lea edx, [esp + 0x50]
push edx
push eax
mov eax, dword [ecx + 0xe8]
call eax
pop ebp
test eax, eax
je 0x4c10fc
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 0x4c10d6
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
inc dword [esp + 0x14]
push 0
lea ecx, [esp + 0x10]
push ecx
push 2
lea edx, [esp + 0x3c]
push edx
push esi
call edi
push 0
lea eax, [esp + 0x10]
push eax
push 2
lea ecx, [esp + 0x28]
push ecx
push esi
call edi
push 0
lea edx, [esp + 0x10]
push edx
push 2
lea eax, [esp + 0x30]
push eax
push esi
call edi
push 0
lea ecx, [esp + 0x10]
push ecx
push 2
lea edx, [esp + 0x2c]
push edx
push esi
call edi
push 0
lea eax, [esp + 0x10]
push eax
push 2
lea ecx, [esp + 0x38]
push ecx
push esi
call edi
push 0
lea edx, [esp + 0x10]
push edx
push 2
lea eax, [esp + 0x34]
push eax
push esi
call edi
push 0
lea ecx, [esp + 0x10]
push ecx
push 2
lea edx, [esp + 0x24]
push edx
push esi
call edi
push 0
lea eax, [esp + 0x10]
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 + 0x4c]
push edx
push 0xc9
mov ecx, 0x6b2fd8
call fcn.004c6410
push eax
push 0x1d
push 0x6b2fd8
call fcn.004c7640
add esp, 0x10
jmp 0x4c111b
push 0xc8
mov ecx, 0x6b2fd8
call fcn.004c6410
push eax
push 0x1d
push 0x6b2fd8
call fcn.004c7640
add esp, 0xc
push 0
lea eax, [esp + 0x50]
push eax
push 0x11
call dword [sym.imp.FreeImage.dll__FreeImage_Load_12]
mov esi, eax
test esi, esi
je case.0x4c0bc7.20
lea ecx, [esp + 0x4c]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [esp + 0x4c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c1146
sub eax, edx
push 0x80
lea edx, [esp + 0x50]
lea eax, [esp + eax + 0x50]
push edx
push esi
mov word [eax - 3], 0x706a
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]
jmp case.0x4c0bc7.20
push 1
mov ecx, 0x6b1160
call fcn.00497280
jmp case.0x4c0bc7.20
push 0
mov ecx, 0x6b1160
call fcn.00497280
jmp case.0x4c0bc7.20
mov eax, dword [0x6a32d8]
test eax, eax
je case.0x4c0bc7.20
mov eax, dword [eax + 0x9586]
test eax, eax
je case.0x4c0bc7.20
cmp dword [eax + 0x1c], 0
je case.0x4c0bc7.20
push 1
mov ecx, 0x6b2fd8
call fcn.004c66e0
jmp case.0x4c0bc7.20
mov eax, dword [0x6a32d8]
test eax, eax
je case.0x4c0bc7.20
mov eax, dword [eax + 0x9586]
test eax, eax
je case.0x4c0bc7.20
cmp dword [eax + 0x1c], 0
je case.0x4c0bc7.20
push 0
mov ecx, 0x6b2fd8
call fcn.004c66e0
jmp case.0x4c0bc7.20
mov ecx, dword [0x6a3390]
test ecx, ecx
je case.0x4c0bc7.20
mov eax, dword [ecx]
mov eax, dword [eax + 8]
xor edx, edx
cmp dword [ecx + 0xe], edx
sete dl
push edx
call eax
jmp case.0x4c0bc7.20
mov eax, dword [0x6b1164]
cmp dword [eax + 0x312], 0
jne case.0x4c0bc7.20
cmp dword [eax + 0x3f6], 0
jne case.0x4c0bc7.20
mov ecx, 0x6bf4c8
call fcn.004fb120
jmp case.0x4c0bc7.20
cmp dword [0x6ddd48], 4
je case.0x4c0bc7.20
mov ecx, dword [0x6a34d4]
mov edx, dword [ecx]
mov eax, dword [edx + 8]
push 0
call eax
jmp case.0x4c0bc7.20
cmp dword [0x6ddd48], 4
je case.0x4c0bc7.20
mov cx, word [ecx + 0xa4c]
mov edx, dword [0x6a34d4]
mov word [edx + 0x252], cx
mov ecx, dword [0x6a34d4]
mov eax, dword [ecx]
mov edx, dword [eax + 8]
push 1
call edx
jmp case.0x4c0bc7.20
mov ecx, dword [0x6b1164]
mov eax, 1
cmp dword [ecx + 0x3f6], eax
jne case.0x4c0bc7.20
mov ecx, dword [0x6a32c0]
mov edx, dword [ecx]
cmp dword [ecx + 0xe], eax
je 0x4c126e
push eax
mov eax, dword [edx + 8]
call eax
jmp case.0x4c0bc7.20
mov ax, word [0x6dd984]
cmp ax, 5
je case.0x4c0bc7.20
cmp ax, 0x36
je case.0x4c0bc7.20
movzx esi, ax
call fcn.00404230
mov dword [eax + 0x22e], esi
call fcn.00404230
xor ecx, ecx
xor ebx, ebx
cmp dword [eax + 0xea], ebx
sete cl
mov esi, ecx
call fcn.00404230
mov dword [eax + 0xea], esi
call fcn.00404230
cmp dword [eax + 0xea], ebx
je 0x4c1436
call fcn.00404230
cmp dword [eax + 0x17e], ebx
je 0x4c13e0
mov esi, dword [0x6b1164]
mov edi, dword [esi]
call fcn.00404230
mov edx, dword [edi + 0x88]
add eax, 0xde
push eax
mov ecx, esi
call edx
call fcn.00404230
fld dword [eax + 0xde]
fdiv qword [0x583610]
fnstcw word [esp + 0x12]
movzx eax, word [esp + 0x12]
or eax, 0xc00
mov dword [esp + 0x18], eax
fldcw word [esp + 0x18]
fistp qword [esp + 0x34]
mov esi, dword [esp + 0x34]
fldcw word [esp + 0x12]
call fcn.00404230
mov dword [eax + 0x226], esi
call fcn.00404230
fld dword [eax + 0xe6]
fdiv qword [0x583610]
fnstcw word [esp + 0x12]
movzx eax, word [esp + 0x12]
or eax, 0xc00
mov dword [esp + 0x34], eax
fldcw word [esp + 0x34]
fistp qword [esp + 0x34]
mov esi, dword [esp + 0x34]
fldcw word [esp + 0x12]
call fcn.00404230
mov dword [eax + 0x22a], esi
push 0x9af
mov ecx, 0x6b2fd8
call fcn.004c6410
push eax
push 0x32
push 0x6b2fd8
call fcn.004c7640
movzx esi, word [0x6dd984]
add esp, 0xc
call fcn.00404230
mov dword [eax + 0x22e], esi
call fcn.00404230
mov dword [eax + 0x1d7e], ebx
call fcn.00404230
mov dword [eax + 0x1d82], ebx
mov ecx, dword [0x6a358c]
cmp dword [ecx + 0xe], ebx
je 0x4c148a
push 1
jmp 0x4c1477
push 0x9b0
mov ecx, 0x6b2fd8
call fcn.004c6410
push eax
push 0x32
push 0x6b2fd8
call fcn.004c7640
add esp, 0xc
call fcn.00404230
mov dword [eax + 0x1d7e], ebx
call fcn.00404230
mov dword [eax + 0x1d82], ebx
mov ecx, dword [0x6a358c]
cmp dword [ecx + 0xe], ebx
je 0x4c148a
push ebx
mov eax, dword [ecx]
mov edx, dword [eax + 0x60]
push 0x3e0
call edx
mov ecx, eax
call fcn.00430f60
call fcn.00404230
mov ecx, eax
call fcn.004014d0
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x240]
xor ecx, esp
call fcn.00565c32
add esp, 0x244
ret 4