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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x238
mov eax, dword [0x66c240]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp eax, 0x29
ja case.default.0x4e919a
push ebx
push esi
push edi
jmp dword [eax*4 + 0x4e99fc]
push 0
jmp 0x4e91c7
push 1
jmp 0x4e91c7
push 2
jmp 0x4e91c7
push 3
jmp 0x4e91c7
push 4
jmp 0x4e91c7
push 5
jmp 0x4e91c7
push 6
jmp 0x4e91c7
push 7
jmp 0x4e91c7
push 8
jmp 0x4e91c7
push 9
mov ecx, 0x6b25e0
call fcn.0052bbef
jmp case.0x4e919a.20
push 0
jmp 0x4e91e4
push 1
jmp 0x4e91e4
push 2
jmp 0x4e91e4
push 3
mov ecx, dword [0x6a4554]
call fcn.00528fbb
jmp case.0x4e919a.20
push 3
jmp 0x4e9252
push 2
jmp 0x4e9252
push 4
jmp 0x4e9252
push 7
jmp 0x4e9252
push 5
jmp 0x4e9252
mov ecx, 0x5ce238
call fcn.004b7483
test eax, eax
jne case.0x4e919a.20
push 0xb
jmp 0x4e9252
push 0xa
jmp 0x4e9252
push 8
jmp 0x4e9252
push 9
jmp 0x4e9252
mov ecx, 0x5cebe8
call fcn.00518818
jmp case.0x4e919a.20
mov ecx, 0x6a5c64
call fcn.004a1638
jmp case.0x4e919a.20
push 0
jmp 0x4e9252
push 1
jmp 0x4e9252
push 6
mov ecx, dword [0x6a4508]
call fcn.004ea7aa
jmp case.0x4e919a.20
mov ecx, 0x6a7ab0
call fcn.004f00d6
jmp case.0x4e919a.20
xor ebx, ebx
mov ecx, 0x69b980
push ebx
call fcn.0046c901
push ebx
push str.ScreenShot
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [ebp - 0x214]
mov dword [ebp - 0x228], ebx
push eax
mov dword [ebp - 0x220], ebx
mov dword [ebp - 0x224], ebx
mov dword [ebp - 0x22c], ebx
mov dword [ebp - 0x21c], ebx
mov dword [ebp - 0x234], ebx
mov dword [ebp - 0x230], ebx
mov dword [ebp - 0x238], ebx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push ebx
push 0x80
push 3
push ebx
push ebx
push closesocket
push str.ini_ScreenShot.cnt
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
mov dword [ebp - 0x218], ebx
cmp edi, 0xffffffff
je 0x4e941d
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x218]
push ebx
push eax
push 2
lea eax, [ebp - 0x228]
push eax
push edi
call esi
push ebx
lea eax, [ebp - 0x218]
push eax
push 2
lea eax, [ebp - 0x220]
push eax
push edi
call esi
push ebx
lea eax, [ebp - 0x218]
push eax
push 2
lea eax, [ebp - 0x224]
push eax
push edi
call esi
push ebx
lea eax, [ebp - 0x218]
push eax
push 2
lea eax, [ebp - 0x22c]
push eax
push edi
call esi
push ebx
lea eax, [ebp - 0x218]
push eax
push 2
lea eax, [ebp - 0x234]
push eax
push edi
call esi
push ebx
lea eax, [ebp - 0x218]
push eax
push 2
lea eax, [ebp - 0x230]
push eax
push edi
call esi
push ebx
lea eax, [ebp - 0x218]
push eax
push 2
lea eax, [ebp - 0x238]
push eax
push edi
call esi
push ebx
lea eax, [ebp - 0x218]
push eax
push 2
lea eax, [ebp - 0x21c]
push eax
push edi
call esi
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [0x6a8580]
cmp word [ebp - 0x228], cx
jne 0x4e9418
mov ax, word [ebp - 0x214]
cmp ax, word [ebp - 0x220]
jne 0x4e9418
mov ax, word [ebp - 0x212]
cmp ax, word [ebp - 0x224]
jne 0x4e9418
mov edi, dword [ebp - 0x22c]
cmp word [ebp - 0x20e], di
jne 0x4e9418
mov esi, dword [ebp - 0x234]
cmp word [ebp - 0x20c], si
jne 0x4e9418
mov edx, dword [ebp - 0x230]
cmp word [ebp - 0x20a], dx
jne 0x4e9418
mov ecx, dword [ebp - 0x238]
cmp word [ebp - 0x208], cx
jne 0x4e9412
mov eax, dword [ebp - 0x21c]
jmp 0x4e9481
mov ecx, dword [0x6a8580]
movzx eax, cx
jmp 0x4e9424
movzx eax, word [0x6a8580]
movzx ecx, word [ebp - 0x208]
movzx edx, word [ebp - 0x20a]
movzx esi, word [ebp - 0x20c]
movzx edi, word [ebp - 0x20e]
mov dword [ebp - 0x228], eax
movzx eax, word [ebp - 0x214]
mov dword [ebp - 0x220], eax
movzx eax, word [ebp - 0x212]
mov dword [ebp - 0x224], eax
xor eax, eax
inc eax
mov dword [ebp - 0x238], ecx
mov dword [ebp - 0x230], edx
mov dword [ebp - 0x234], esi
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x22c], edi
movzx eax, ax
push eax
movzx eax, cx
push eax
movzx eax, dx
push eax
movzx eax, si
push eax
movzx eax, di
push eax
mov eax, dword [ebp - 0x224]
movzx eax, ax
push eax
mov eax, dword [ebp - 0x220]
movzx eax, ax
push 0x64
cdq
pop esi
idiv esi
mov eax, dword [ebp - 0x228]
push edx
movzx eax, ax
push eax
lea eax, [ebp - 0x104]
push str.ScreenShot_DarkStory__02d__02d_02d_02d__02d_02d_02d__03d.jpg
push eax
call fcn.0055f31c
movzx eax, word [ebp - 0x21c]
push eax
movzx eax, word [ebp - 0x238]
push eax
movzx eax, word [ebp - 0x230]
push eax
movzx eax, word [ebp - 0x234]
push eax
movzx eax, word [ebp - 0x22c]
push eax
movzx eax, word [ebp - 0x224]
push eax
movzx eax, word [ebp - 0x220]
cdq
idiv esi
movzx eax, word [ebp - 0x228]
push edx
push eax
lea eax, [ebp - 0x204]
push str.ScreenShot_DarkStory__02d__02d_02d_02d__02d_02d_02d__03d.txt
push eax
call fcn.0055f31c
mov eax, dword [0x6a3ea4]
add esp, 0x50
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
lea edx, [ebp - 0x104]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0xe8]
test eax, eax
je 0x4e9642
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push str.ini_ScreenShot.cnt
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x4e961c
inc dword [ebp - 0x21c]
lea eax, [ebp - 0x218]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
push eax
push 2
lea eax, [ebp - 0x228]
push eax
push edi
call esi
push ebx
lea eax, [ebp - 0x218]
push eax
push 2
lea eax, [ebp - 0x220]
push eax
push edi
call esi
push ebx
lea eax, [ebp - 0x218]
push eax
push 2
lea eax, [ebp - 0x224]
push eax
push edi
call esi
push ebx
lea eax, [ebp - 0x218]
push eax
push 2
lea eax, [ebp - 0x22c]
push eax
push edi
call esi
push ebx
lea eax, [ebp - 0x218]
push eax
push 2
lea eax, [ebp - 0x234]
push eax
push edi
call esi
push ebx
lea eax, [ebp - 0x218]
push eax
push 2
lea eax, [ebp - 0x230]
push eax
push edi
call esi
push ebx
lea eax, [ebp - 0x218]
push eax
push 2
lea eax, [ebp - 0x238]
push eax
push edi
call esi
push ebx
lea eax, [ebp - 0x218]
push eax
push 2
lea eax, [ebp - 0x21c]
push eax
push edi
call esi
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x104]
mov esi, 0x697e20
push eax
push 0xc9
mov ecx, esi
call fcn.0045e819
push eax
push 0x17
push esi
call fcn.0045e193
add esp, 0x10
jmp 0x4e965f
mov esi, 0x697e20
push 0xc8
mov ecx, esi
call fcn.0045e819
push eax
push 0x17
push esi
call fcn.0045e193
add esp, 0xc
push ebx
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.0x4e919a.20
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [ebp - 0x104]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4e968f
sub ecx, edx
lea eax, [ebp - 0x104]
push 0x80
push eax
push esi
mov word [ebp + ecx - 0x107], 0x706a
mov byte [ebp + ecx - 0x105], 0x67
call dword [sym.imp.FreeImage.dll__FreeImage_SaveJPEG_12]
push esi
call dword [sym.imp.FreeImage.dll__FreeImage_Unload_4]
jmp case.0x4e919a.20
push 1
jmp 0x4e96cf
push 0
mov ecx, 0x6b1010
call fcn.0050f71f
jmp case.0x4e919a.20
mov eax, dword [0x6a4504]
test eax, eax
je case.0x4e919a.20
mov eax, dword [eax + 0x23418]
test eax, eax
je case.0x4e919a.20
cmp dword [eax + 0x1c], 0
je case.0x4e919a.20
push 1
jmp 0x4e972e
mov eax, dword [0x6a4504]
test eax, eax
je case.0x4e919a.20
mov eax, dword [eax + 0x23418]
test eax, eax
je case.0x4e919a.20
cmp dword [eax + 0x1c], 0
je case.0x4e919a.20
push 0
mov ecx, 0x697e20
call fcn.0045e6ed
jmp case.0x4e919a.20
mov ecx, dword [0x6a45bc]
test ecx, ecx
je case.0x4e919a.20
mov edx, dword [ecx]
xor eax, eax
cmp dword [ecx + 0xe], eax
sete al
push eax
call dword [edx + 8]
jmp case.0x4e919a.20
mov eax, dword [0x6b1014]
cmp dword [eax + 0x310], 0
jne case.0x4e919a.20
cmp dword [eax + 0x3f3], 0
jne case.0x4e919a.20
mov ecx, 0x5ce810
call fcn.005045d7
jmp case.0x4e919a.20
cmp dword [0x6a7ac8], 4
je case.0x4e919a.20
mov ecx, dword [0x6a46f0]
mov eax, dword [ecx]
jmp 0x4e97f5
cmp dword [0x6a7ac8], 4
je case.0x4e919a.20
mov eax, dword [0x6a46f0]
mov cx, word [ecx + 0xa84]
mov word [eax + 0x998], cx
mov ecx, dword [0x6a46f0]
mov eax, dword [ecx]
push 1
call dword [eax + 8]
jmp case.0x4e919a.20
mov eax, dword [0x6b1014]
cmp dword [eax + 0x3f3], 1
jne case.0x4e919a.20
mov ecx, dword [0x6a44e8]
cmp dword [ecx + 0xe], 1
mov eax, dword [ecx]
jne 0x4e97cb
push 0
jmp 0x4e97cd
mov ax, word [0x6a8634]
cmp ax, 5
je case.0x4e919a.20
movzx esi, ax
call fcn.00446869
mov dword [eax + 0x222], esi
call fcn.00446869
xor ebx, ebx
xor edi, edi
cmp dword [eax + 0xe6], edi
sete bl
call fcn.00446869
mov dword [eax + 0xe6], ebx
call fcn.00446869
cmp dword [eax + 0xe6], edi
je 0x4e995c
call fcn.00446869
cmp dword [eax + 0x176], edi
je 0x4e98bd
mov esi, dword [0x6b1014]
mov edi, dword [esi]
call fcn.00446869
add eax, 0xda
mov ecx, esi
push eax
call dword [edi + 0x88]
call fcn.00446869
movss xmm0, dword [eax + 0xda]
divss xmm0, dword [0x58b1a8]
call fcn.0055fa90
mov esi, eax
call fcn.00446869
mov dword [eax + 0x21a], esi
call fcn.00446869
movss xmm0, dword [eax + 0xe2]
divss xmm0, dword [0x58b1a8]
call fcn.0055fa90
mov esi, eax
call fcn.00446869
xor edi, edi
mov dword [eax + 0x21e], esi
mov esi, dword [0x6a47a8]
mov ebx, 0x697e20
push 0x902
mov ecx, ebx
call fcn.0045e819
push eax
mov ecx, esi
call fcn.0046030a
mov ecx, dword [0x6a47a8]
xor esi, esi
inc esi
push esi
mov eax, dword [ecx]
call dword [eax + 8]
mov eax, dword [0x6a47a8]
mov dword [eax + 0x2c], esi
call fcn.00446869
push dword [eax + 0x21e]
call fcn.00446869
mov ecx, ebx
push dword [eax + 0x21a]
push 0x900
call fcn.0045e819
push eax
push 0x17
push ebx
call fcn.0045e193
movzx esi, word [0x6a8634]
add esp, 0x14
call fcn.00446869
mov dword [eax + 0x222], esi
call fcn.00446869
mov dword [eax + 0x1d72], edi
call fcn.00446869
mov dword [eax + 0x1d76], edi
mov ecx, dword [0x6a4754]
cmp dword [ecx + 0xe], edi
je 0x4e99dd
push 1
jmp 0x4e99cc
mov esi, dword [0x6a47a8]
mov ebx, 0x697e20
push 0x903
mov ecx, ebx
call fcn.0045e819
push eax
mov ecx, esi
call fcn.0046030a
mov ecx, dword [0x6a47a8]
xor esi, esi
inc esi
push esi
mov eax, dword [ecx]
call dword [eax + 8]
mov eax, dword [0x6a47a8]
mov ecx, ebx
push 0x901
mov dword [eax + 0x2c], esi
call fcn.0045e819
push eax
push 0x17
push ebx
call fcn.0045e193
add esp, 0xc
call fcn.00446869
mov dword [eax + 0x1d72], edi
call fcn.00446869
mov dword [eax + 0x1d76], edi
mov ecx, dword [0x6a4754]
cmp dword [ecx + 0xe], edi
je 0x4e99dd
push edi
mov eax, dword [ecx]
push 0x39f
call dword [eax + 0x60]
mov ecx, eax
call fcn.004ac7d4
call fcn.00446869
mov ecx, eax
call fcn.00446681
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0055dcf4
mov esp, ebp
pop ebp
ret 4