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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x244
mov eax, dword [0x6dc4f0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp eax, 0x28
ja case.default.0x4d8622
push ebx
push esi
push edi
jmp dword [eax*4 + 0x4d91f4]
push 0
mov ecx, 0x6cf668
call fcn.004d2360
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
push 1
mov ecx, 0x6cf668
call fcn.004d2360
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
push 2
mov ecx, 0x6cf668
call fcn.004d2360
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
push 3
mov ecx, 0x6cf668
call fcn.004d2360
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
push 4
mov ecx, 0x6cf668
call fcn.004d2360
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
push 5
mov ecx, 0x6cf668
call fcn.004d2360
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
push 6
mov ecx, 0x6cf668
call fcn.004d2360
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
push 7
mov ecx, 0x6cf668
call fcn.004d2360
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
push 8
mov ecx, 0x6cf668
call fcn.004d2360
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
push 9
mov ecx, 0x6cf668
call fcn.004d2360
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6de790]
push 0
call fcn.00471ab0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6de790]
push 1
call fcn.00471ab0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6de790]
push 2
call fcn.00471ab0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6de790]
push 3
call fcn.00471ab0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6de744]
push 3
call fcn.004530b0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6de744]
push 2
call fcn.004530b0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6de744]
push 4
call fcn.004530b0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6de744]
push 7
call fcn.004530b0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6de744]
push 5
call fcn.004530b0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
mov ecx, 0x6cd410
call fcn.00447c00
test eax, eax
jne case.0x4d8622.20
mov ecx, dword [0x6de744]
push 0xb
call fcn.004530b0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6de744]
push 0xa
call fcn.004530b0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6de744]
push 8
call fcn.004530b0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6de744]
push 9
call fcn.004530b0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
mov ecx, 0x6cf958
call fcn.004d5810
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
mov ecx, 0x6d95a4
call fcn.005380c0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6de744]
push 1
call fcn.004530b0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6de744]
push 6
call fcn.004530b0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
mov ecx, 0x710600
call fcn.0056c4c0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
xor ebx, ebx
push ebx
mov ecx, 0x6dbb30
call fcn.00579ce0
push ebx
push str.ScreenShot
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [ebp - 0x214]
push eax
mov dword [ebp - 0x23c], ebx
mov dword [ebp - 0x22c], ebx
mov dword [ebp - 0x228], ebx
mov dword [ebp - 0x230], ebx
mov dword [ebp - 0x224], ebx
mov dword [ebp - 0x234], ebx
mov dword [ebp - 0x238], ebx
mov dword [ebp - 0x220], 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 [ebp - 0x218], ebx
cmp esi, 0xffffffff
je 0x4d8b56
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
lea ecx, [ebp - 0x218]
push ecx
push 2
lea edx, [ebp - 0x23c]
push edx
push esi
call edi
push ebx
lea eax, [ebp - 0x218]
push eax
push 2
lea ecx, [ebp - 0x22c]
push ecx
push esi
call edi
push ebx
lea edx, [ebp - 0x218]
push edx
push 2
lea eax, [ebp - 0x228]
push eax
push esi
call edi
push ebx
lea ecx, [ebp - 0x218]
push ecx
push 2
lea edx, [ebp - 0x230]
push edx
push esi
call edi
push ebx
lea eax, [ebp - 0x218]
push eax
push 2
lea ecx, [ebp - 0x234]
push ecx
push esi
call edi
push ebx
lea edx, [ebp - 0x218]
push edx
push 2
lea eax, [ebp - 0x238]
push eax
push esi
call edi
push ebx
lea ecx, [ebp - 0x218]
push ecx
push 2
lea edx, [ebp - 0x220]
push edx
push esi
call edi
push ebx
lea eax, [ebp - 0x218]
push eax
push 2
lea ecx, [ebp - 0x224]
push ecx
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x23c]
mov bx, word [ebp - 0x208]
cmp cx, word [0x6ddc3c]
jne 0x4d8b44
mov dx, word [ebp - 0x214]
cmp dx, word [ebp - 0x22c]
jne 0x4d8b44
mov ax, word [ebp - 0x212]
cmp ax, word [ebp - 0x228]
jne 0x4d8b44
mov edi, dword [ebp - 0x230]
cmp word [ebp - 0x20e], di
jne 0x4d8b44
mov esi, dword [ebp - 0x234]
cmp word [ebp - 0x20c], si
jne 0x4d8b44
mov edx, dword [ebp - 0x238]
cmp word [ebp - 0x20a], dx
jne 0x4d8b44
mov eax, dword [ebp - 0x220]
cmp bx, ax
je 0x4d8bbb
movzx eax, word [ebp - 0x212]
mov dword [ebp - 0x228], eax
movzx eax, bx
jmp 0x4d8b6a
movzx eax, word [ebp - 0x212]
mov dword [ebp - 0x228], eax
movzx eax, word [ebp - 0x208]
movzx edx, word [ebp - 0x214]
movzx esi, word [ebp - 0x20c]
movzx edi, word [ebp - 0x20e]
movzx ecx, word [0x6ddc3c]
mov dword [ebp - 0x22c], edx
movzx edx, word [ebp - 0x20a]
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x238], edx
mov dword [ebp - 0x234], esi
mov dword [ebp - 0x224], 1
mov dword [ebp - 0x230], edi
mov dword [ebp - 0x23c], ecx
movzx ebx, word [ebp - 0x224]
push ebx
movzx eax, ax
push eax
movzx edx, dx
push edx
movzx eax, si
push eax
movzx eax, word [ebp - 0x228]
movzx edx, di
push edx
push eax
movzx eax, word [ebp - 0x22c]
cdq
mov esi, 0x64
idiv esi
movzx ecx, cx
push edx
push ecx
lea edx, [ebp - 0x104]
push str.ScreenShot_DarkStory__02d__02d_02d_02d__02d_02d_02d__03d.jpg
push edx
call fcn.00596934
movzx eax, word [ebp - 0x224]
movzx ecx, word [ebp - 0x220]
movzx edx, word [ebp - 0x238]
push eax
movzx eax, word [ebp - 0x234]
push ecx
movzx ecx, word [ebp - 0x230]
push edx
movzx edx, word [ebp - 0x228]
push eax
movzx eax, word [ebp - 0x22c]
push ecx
push edx
cdq
mov ecx, esi
idiv ecx
lea eax, [ebp - 0x204]
push edx
movzx edx, word [ebp - 0x23c]
push edx
push str.ScreenShot_DarkStory__02d__02d_02d_02d__02d_02d_02d__03d.txt
push eax
call fcn.00596934
mov eax, dword [0x70e474]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x10]
add esp, 0x50
push eax
call edx
mov ecx, dword [eax]
lea edx, [ebp - 0x104]
push edx
push eax
mov eax, dword [ecx + 0xe8]
call eax
test eax, eax
je 0x4d8d8b
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 0x4d8d63
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
inc dword [ebp - 0x224]
push 0
lea ecx, [ebp - 0x218]
push ecx
push 2
lea edx, [ebp - 0x23c]
push edx
push esi
call edi
push 0
lea eax, [ebp - 0x218]
push eax
push 2
lea ecx, [ebp - 0x22c]
push ecx
push esi
call edi
push 0
lea edx, [ebp - 0x218]
push edx
push 2
lea eax, [ebp - 0x228]
push eax
push esi
call edi
push 0
lea ecx, [ebp - 0x218]
push ecx
push 2
lea edx, [ebp - 0x230]
push edx
push esi
call edi
push 0
lea eax, [ebp - 0x218]
push eax
push 2
lea ecx, [ebp - 0x234]
push ecx
push esi
call edi
push 0
lea edx, [ebp - 0x218]
push edx
push 2
lea eax, [ebp - 0x238]
push eax
push esi
call edi
push 0
lea ecx, [ebp - 0x218]
push ecx
push 2
lea edx, [ebp - 0x220]
push edx
push esi
call edi
push 0
lea eax, [ebp - 0x218]
push eax
push 2
lea ecx, [ebp - 0x224]
push ecx
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [ebp - 0x104]
push edx
push 0xc9
mov ecx, 0x6ed7f0
call fcn.004de2a0
push eax
push 0x1d
push 0x6ed7f0
call fcn.004df650
add esp, 0x10
jmp 0x4d8daa
push 0xc8
mov ecx, 0x6ed7f0
call fcn.004de2a0
push eax
push 0x1d
push 0x6ed7f0
call fcn.004df650
add esp, 0xc
push 0
lea eax, [ebp - 0x104]
push eax
push 0x11
call dword [sym.imp.FreeImage.dll__FreeImage_Load_12]
mov esi, eax
test esi, esi
je case.0x4d8622.20
lea ecx, [ebp - 0x104]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0x104]
lea edx, [eax + 1]
jmp 0x4d8de0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4d8de0
sub eax, edx
push 0x80
lea edx, [ebp - 0x104]
lea eax, [ebp + eax - 0x104]
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]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
push 1
mov ecx, 0x6ebcc8
call fcn.004ab720
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
push 0
mov ecx, 0x6ebcc8
call fcn.004ab720
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x6de740]
test eax, eax
je case.0x4d8622.20
mov eax, dword [eax + 0x96dc]
test eax, eax
je case.0x4d8622.20
cmp dword [eax + 0x20], 0
je case.0x4d8622.20
push 1
mov ecx, 0x6ed7f0
call fcn.004de580
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x6de740]
test eax, eax
je case.0x4d8622.20
mov eax, dword [eax + 0x96dc]
test eax, eax
je case.0x4d8622.20
cmp dword [eax + 0x20], 0
je case.0x4d8622.20
push 0
mov ecx, 0x6ed7f0
call fcn.004de580
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6de7f8]
test ecx, ecx
je case.0x4d8622.20
mov eax, dword [ecx]
mov eax, dword [eax + 8]
xor edx, edx
cmp dword [ecx + 0x10], edx
sete dl
push edx
call eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x6ebccc]
cmp dword [eax + 0x31c], 0
jne case.0x4d8622.20
cmp dword [eax + 0x404], 0
jne case.0x4d8622.20
mov ecx, 0x6d7fbc
call fcn.00516490
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
cmp dword [0x710618], 4
je case.0x4d8622.20
mov ecx, dword [0x6de93c]
mov edx, dword [ecx]
mov eax, dword [edx + 8]
push 0
call eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
cmp dword [0x710618], 4
je case.0x4d8622.20
mov cx, word [ecx + 0xbc4]
mov edx, dword [0x6de93c]
mov word [edx + 0x258], cx
mov ecx, dword [0x6de93c]
mov eax, dword [ecx]
mov edx, dword [eax + 8]
push 1
call edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6ebccc]
mov eax, 1
cmp dword [ecx + 0x404], eax
jne case.0x4d8622.20
mov ecx, dword [0x6de728]
mov edx, dword [ecx]
cmp dword [ecx + 0x10], eax
je 0x4d8f6f
push eax
mov eax, dword [edx + 8]
call eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4
mov ax, word [0x71024c]
cmp ax, 5
je case.0x4d8622.20
cmp ax, 0x36
je case.0x4d8622.20
movzx esi, ax
call fcn.004012e0
mov dword [eax + 0x230], esi
call fcn.004012e0
xor ecx, ecx
xor ebx, ebx
cmp dword [eax + 0xec], ebx
sete cl
mov esi, ecx
call fcn.004012e0
mov dword [eax + 0xec], esi
call fcn.004012e0
cmp dword [eax + 0xec], ebx
je 0x4d9181
call fcn.004012e0
cmp dword [eax + 0x180], ebx
je 0x4d912b
mov esi, dword [0x6ebccc]
mov edi, dword [esi]
call fcn.004012e0
mov edx, dword [edi + 0x88]
add eax, 0xe0
push eax
mov ecx, esi
call edx
call fcn.004012e0
fld dword [eax + 0xe0]
fdiv qword [0x5b5658]
fnstcw word [ebp - 0x21a]
movzx eax, word [ebp - 0x21a]
or eax, 0xc00
mov dword [ebp - 0x220], eax
fldcw word [ebp - 0x220]
fistp qword [ebp - 0x244]
mov esi, dword [ebp - 0x244]
fldcw word [ebp - 0x21a]
call fcn.004012e0
mov dword [eax + 0x228], esi
call fcn.004012e0
fld dword [eax + 0xe8]
fdiv qword [0x5b5658]
fnstcw word [ebp - 0x21a]
movzx eax, word [ebp - 0x21a]
or eax, 0xc00
mov dword [ebp - 0x240], eax
fldcw word [ebp - 0x240]
fistp qword [ebp - 0x244]
mov esi, dword [ebp - 0x244]
fldcw word [ebp - 0x21a]
call fcn.004012e0
mov dword [eax + 0x22c], esi
push 0x9af
mov ecx, 0x6ed7f0
call fcn.004de2a0
push eax
push 0x32
push 0x6ed7f0
call fcn.004df650
movzx esi, word [0x71024c]
add esp, 0xc
call fcn.004012e0
mov dword [eax + 0x230], esi
call fcn.004012e0
mov dword [eax + 0x1d80], ebx
call fcn.004012e0
mov dword [eax + 0x1d84], ebx
mov ecx, dword [0x6de9f4]
cmp dword [ecx + 0x10], ebx
je 0x4d91d5
push 1
jmp 0x4d91c2
push 0x9b0
mov ecx, 0x6ed7f0
call fcn.004de2a0
push eax
push 0x32
push 0x6ed7f0
call fcn.004df650
add esp, 0xc
call fcn.004012e0
mov dword [eax + 0x1d80], ebx
call fcn.004012e0
mov dword [eax + 0x1d84], ebx
mov ecx, dword [0x6de9f4]
cmp dword [ecx + 0x10], ebx
je 0x4d91d5
push ebx
mov eax, dword [ecx]
mov edx, dword [eax + 0x60]
push 0x3e0
call edx
mov ecx, eax
call fcn.00438800
call fcn.004012e0
mov ecx, eax
call fcn.00403520
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059641f
mov esp, ebp
pop ebp
ret 4