Function at 0x4f3a98
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 [0x695e80]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp eax, 0x29
ja case.default.0x4f36f2
push ebx
push esi
push edi
jmp dword [eax*4 + 0x4f4338]
push 0
mov ecx, 0x6cb178
call fcn.00549850
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
push 1
mov ecx, 0x6cb178
call fcn.00549850
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
push 2
mov ecx, 0x6cb178
call fcn.00549850
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
push 3
mov ecx, 0x6cb178
call fcn.00549850
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
push 4
mov ecx, 0x6cb178
call fcn.00549850
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
push 5
mov ecx, 0x6cb178
call fcn.00549850
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
push 6
mov ecx, 0x6cb178
call fcn.00549850
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
push 7
mov ecx, 0x6cb178
call fcn.00549850
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
push 8
mov ecx, 0x6cb178
call fcn.00549850
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
push 9
mov ecx, 0x6cb178
call fcn.00549850
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6c4af0]
push 0
call fcn.00546680
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6c4af0]
push 1
call fcn.00546680
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6c4af0]
push 2
call fcn.00546680
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6c4af0]
push 3
call fcn.00546680
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6c4aa4]
push 3
call fcn.004f53d0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6c4aa4]
push 2
call fcn.004f53d0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6c4aa4]
push 4
call fcn.004f53d0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6c4aa4]
push 7
call fcn.004f53d0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6c4aa4]
push 5
call fcn.004f53d0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
mov ecx, 0x5f08b0
call fcn.004bb830
test eax, eax
jne case.0x4f36f2.20
mov ecx, dword [0x6c4aa4]
push 0xb
call fcn.004f53d0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6c4aa4]
push 0xa
call fcn.004f53d0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6c4aa4]
push 8
call fcn.004f53d0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6c4aa4]
push 9
call fcn.004f53d0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
mov ecx, 0x5f8558
call fcn.005304f0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
mov ecx, 0x5f0254
call fcn.004a1a60
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6c4aa4]
push 0
call fcn.004f53d0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6c4aa4]
push 1
call fcn.004f53d0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6c4aa4]
push 6
call fcn.004f53d0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
mov ecx, 0x6c7950
call fcn.004fbd70
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
push 0
mov ecx, 0x5ef6e0
call fcn.0045c420
push 0
push str.ScreenShot
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [ebp - 0x214]
mov dword [ebp - 0x224], 0
push eax
mov dword [ebp - 0x22c], 0
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x21c], 0
mov dword [ebp - 0x238], 0
mov dword [ebp - 0x234], 0
mov dword [ebp - 0x220], 0
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 0
push 0x80
push 3
push 0
push 0
push closesocket
push str.ini_ScreenShot.cnt
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
mov dword [ebp - 0x218], 0
cmp edi, 0xffffffff
je 0x4f3c68
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x218]
push 0
push eax
push 2
lea eax, [ebp - 0x224]
push eax
push edi
call esi
push 0
lea eax, [ebp - 0x218]
push eax
push 2
lea eax, [ebp - 0x22c]
push eax
push edi
call esi
push 0
lea eax, [ebp - 0x218]
push eax
push 2
lea eax, [ebp - 0x228]
push eax
push edi
call esi
push 0
lea eax, [ebp - 0x218]
push eax
push 2
lea eax, [ebp - 0x230]
push eax
push edi
call esi
push 0
lea eax, [ebp - 0x218]
push eax
push 2
lea eax, [ebp - 0x238]
push eax
push edi
call esi
push 0
lea eax, [ebp - 0x218]
push eax
push 2
lea eax, [ebp - 0x234]
push eax
push edi
call esi
push 0
lea eax, [ebp - 0x218]
push eax
push 2
lea eax, [ebp - 0x220]
push eax
push edi
call esi
push 0
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 eax, dword [0x6c840c]
cmp word [ebp - 0x224], ax
jne 0x4f3c63
mov ecx, dword [ebp - 0x22c]
cmp word [ebp - 0x214], cx
jne 0x4f3c63
mov edx, dword [ebp - 0x228]
cmp word [ebp - 0x212], dx
jne 0x4f3c63
mov esi, dword [ebp - 0x230]
cmp word [ebp - 0x20e], si
jne 0x4f3c63
mov edi, dword [ebp - 0x238]
cmp word [ebp - 0x20c], di
jne 0x4f3c63
mov ebx, dword [ebp - 0x234]
cmp word [ebp - 0x20a], bx
jne 0x4f3c63
mov ax, word [ebp - 0x208]
cmp ax, word [ebp - 0x220]
je 0x4f3ccd
mov eax, dword [0x6c840c]
movzx eax, ax
jmp 0x4f3c6f
movzx eax, word [0x6c840c]
movzx ebx, word [ebp - 0x20a]
movzx edi, word [ebp - 0x20c]
movzx esi, word [ebp - 0x20e]
movzx edx, word [ebp - 0x212]
movzx ecx, word [ebp - 0x214]
mov dword [ebp - 0x224], eax
movzx eax, word [ebp - 0x208]
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x234], ebx
mov dword [ebp - 0x238], edi
mov dword [ebp - 0x21c], 1
mov dword [ebp - 0x230], esi
mov dword [ebp - 0x228], edx
mov dword [ebp - 0x22c], ecx
mov eax, dword [ebp - 0x21c]
movzx eax, ax
push eax
mov eax, dword [ebp - 0x220]
movzx eax, ax
push eax
movzx eax, bx
push eax
movzx eax, di
push eax
movzx eax, si
mov esi, 0x64
push eax
movzx eax, dx
push eax
movzx eax, cx
cdq
idiv esi
mov eax, dword [ebp - 0x224]
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.0058729c
movzx eax, word [ebp - 0x21c]
push eax
movzx eax, word [ebp - 0x220]
push eax
movzx eax, word [ebp - 0x234]
push eax
movzx eax, word [ebp - 0x238]
push eax
movzx eax, word [ebp - 0x230]
push eax
movzx eax, word [ebp - 0x228]
push eax
movzx eax, word [ebp - 0x22c]
cdq
idiv esi
movzx eax, word [ebp - 0x224]
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.0058729c
mov eax, dword [0x6c46a4]
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 0x4f3e9d
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 edi, eax
cmp edi, 0xffffffff
je 0x4f3e75
inc dword [ebp - 0x21c]
lea eax, [ebp - 0x218]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
push eax
push 2
lea eax, [ebp - 0x224]
push eax
push edi
call esi
push 0
lea eax, [ebp - 0x218]
push eax
push 2
lea eax, [ebp - 0x22c]
push eax
push edi
call esi
push 0
lea eax, [ebp - 0x218]
push eax
push 2
lea eax, [ebp - 0x228]
push eax
push edi
call esi
push 0
lea eax, [ebp - 0x218]
push eax
push 2
lea eax, [ebp - 0x230]
push eax
push edi
call esi
push 0
lea eax, [ebp - 0x218]
push eax
push 2
lea eax, [ebp - 0x238]
push eax
push edi
call esi
push 0
lea eax, [ebp - 0x218]
push eax
push 2
lea eax, [ebp - 0x234]
push eax
push edi
call esi
push 0
lea eax, [ebp - 0x218]
push eax
push 2
lea eax, [ebp - 0x220]
push eax
push edi
call esi
push 0
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 ecx, 0x6b8778
push eax
push 0xc9
call fcn.0044a110
push eax
push 0x17
push 0x6b8778
call fcn.00449a00
add esp, 0x10
jmp 0x4f3ebc
push 0xc8
mov ecx, 0x6b8778
call fcn.0044a110
push eax
push 0x17
push 0x6b8778
call fcn.00449a00
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.0x4f36f2.20
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [ebp - 0x104]
lea edx, [ecx + 1]
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4f3ef0
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]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
push 1
mov ecx, 0x6c9eb0
call fcn.005257c0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
push 0
mov ecx, 0x6c9eb0
call fcn.005257c0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x6c4aa0]
test eax, eax
je case.0x4f36f2.20
mov eax, dword [eax + 0x23418]
test eax, eax
je case.0x4f36f2.20
cmp dword [eax + 0x1c], 0
je case.0x4f36f2.20
push 1
mov ecx, 0x6b8778
call fcn.00449f90
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x6c4aa0]
test eax, eax
je case.0x4f36f2.20
mov eax, dword [eax + 0x23418]
test eax, eax
je case.0x4f36f2.20
cmp dword [eax + 0x1c], 0
je case.0x4f36f2.20
push 0
mov ecx, 0x6b8778
call fcn.00449f90
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6c4b58]
test ecx, ecx
je case.0x4f36f2.20
mov edx, dword [ecx]
xor eax, eax
cmp dword [ecx + 0xe], eax
sete al
push eax
call dword [edx + 8]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x6c9eb4]
cmp dword [eax + 0x312], 0
jne case.0x4f36f2.20
cmp dword [eax + 0x3f6], 0
jne case.0x4f36f2.20
mov ecx, 0x5f1150
call fcn.00516cf0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
cmp dword [0x6c7968], 4
je case.0x4f36f2.20
mov ecx, dword [0x6c4c8c]
push 0
mov eax, dword [ecx]
call dword [eax + 8]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
cmp dword [0x6c7968], 4
je case.0x4f36f2.20
mov eax, dword [0x6c4c8c]
mov cx, word [ecx + 0xa84]
mov word [eax + 0x998], cx
mov ecx, dword [0x6c4c8c]
mov eax, dword [ecx]
push 1
call dword [eax + 8]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x6c9eb4]
cmp dword [eax + 0x3f6], 1
jne case.0x4f36f2.20
mov ecx, dword [0x6c4a88]
cmp dword [ecx + 0xe], 1
mov eax, dword [ecx]
jne 0x4f40be
push 0
call dword [eax + 8]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4
mov ax, word [0x6c84e4]
cmp ax, 5
je case.0x4f36f2.20
movzx esi, ax
call fcn.0042d000
mov dword [eax + 0x222], esi
call fcn.0042d000
xor ebx, ebx
cmp dword [eax + 0xe6], ebx
sete bl
call fcn.0042d000
mov dword [eax + 0xe6], ebx
call fcn.0042d000
cmp dword [eax + 0xe6], 0
je 0x4f4284
call fcn.0042d000
cmp dword [eax + 0x176], 0
je 0x4f41d0
mov esi, dword [0x6c9eb4]
mov edi, dword [esi]
call fcn.0042d000
add eax, 0xda
mov ecx, esi
push eax
call dword [edi + 0x88]
call fcn.0042d000
movss xmm0, dword [eax + 0xda]
divss xmm0, dword [0x5b6088]
call fcn.00587a10
mov esi, eax
call fcn.0042d000
mov dword [eax + 0x21a], esi
call fcn.0042d000
movss xmm0, dword [eax + 0xe2]
divss xmm0, dword [0x5b6088]
call fcn.00587a10
mov esi, eax
call fcn.0042d000
mov dword [eax + 0x21e], esi
mov esi, dword [0x6c4d44]
mov ecx, 0x6b8778
push 0x902
call fcn.0044a110
push eax
mov ecx, esi
call fcn.0044c280
mov ecx, dword [0x6c4d44]
push 1
mov eax, dword [ecx]
call dword [eax + 8]
mov eax, dword [0x6c4d44]
mov dword [eax + 0x2c], 1
call fcn.0042d000
mov eax, dword [eax + 0x21e]
push eax
call fcn.0042d000
mov ecx, 0x6b8778
mov eax, dword [eax + 0x21a]
push eax
push 0x900
call fcn.0044a110
push eax
push 0x17
push 0x6b8778
call fcn.00449a00
movzx esi, word [0x6c84e4]
add esp, 0x14
call fcn.0042d000
mov dword [eax + 0x222], esi
call fcn.0042d000
mov dword [eax + 0x1d72], 0
call fcn.0042d000
mov dword [eax + 0x1d76], 0
mov ecx, dword [0x6c4cf0]
cmp dword [ecx + 0xe], 0
je 0x4f4316
push 1
jmp 0x4f4305
mov esi, dword [0x6c4d44]
mov ecx, 0x6b8778
push 0x903
call fcn.0044a110
push eax
mov ecx, esi
call fcn.0044c280
mov ecx, dword [0x6c4d44]
push 1
mov eax, dword [ecx]
call dword [eax + 8]
mov eax, dword [0x6c4d44]
mov ecx, 0x6b8778
push 0x901
mov dword [eax + 0x2c], 1
call fcn.0044a110
push eax
push 0x17
push 0x6b8778
call fcn.00449a00
add esp, 0xc
call fcn.0042d000
mov dword [eax + 0x1d72], 0
call fcn.0042d000
mov dword [eax + 0x1d76], 0
mov ecx, dword [0x6c4cf0]
cmp dword [ecx + 0xe], 0
je 0x4f4316
push 0
mov eax, dword [ecx]
push 0x380
call dword [eax + 0x60]
mov ecx, eax
call fcn.004af530
call fcn.0042d000
mov ecx, eax
call fcn.0042cd40
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00585d34
mov esp, ebp
pop ebp
ret 4