Function at 0x4fa8b0
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 [0x6a0290]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp eax, 0x29
ja case.default.0x4fa8d2
push ebx
push esi
push edi
jmp dword [eax*4 + 0x4fb518]
push 0
mov ecx, 0x6d8558
call fcn.00551780
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
push 1
mov ecx, 0x6d8558
call fcn.00551780
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
push 2
mov ecx, 0x6d8558
call fcn.00551780
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
push 3
mov ecx, 0x6d8558
call fcn.00551780
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
push 4
mov ecx, 0x6d8558
call fcn.00551780
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
push 5
mov ecx, 0x6d8558
call fcn.00551780
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
push 6
mov ecx, 0x6d8558
call fcn.00551780
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
push 7
mov ecx, 0x6d8558
call fcn.00551780
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
push 8
mov ecx, 0x6d8558
call fcn.00551780
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
push 9
mov ecx, 0x6d8558
call fcn.00551780
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6d2324]
push 0
call fcn.0054e460
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6d2324]
push 1
call fcn.0054e460
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6d2324]
push 2
call fcn.0054e460
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6d2324]
push 3
call fcn.0054e460
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6d22d8]
push 3
call fcn.004fc590
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6d22d8]
push 2
call fcn.004fc590
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6d22d8]
push 4
call fcn.004fc590
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6d22d8]
push 7
call fcn.004fc590
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6d22d8]
push 5
call fcn.004fc590
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
mov ecx, 0x5fad18
call fcn.004c06c0
test eax, eax
jne case.0x4fa8d2.20
mov ecx, dword [0x6d22d8]
push 0xb
call fcn.004fc590
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6d22d8]
push 0xa
call fcn.004fc590
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6d22d8]
push 8
call fcn.004fc590
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6d22d8]
push 9
call fcn.004fc590
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
mov ecx, 0x602970
call fcn.005381e0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
mov ecx, 0x5fa284
call fcn.004a33a0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6d22d8]
push 0
call fcn.004fc590
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6d22d8]
push 1
call fcn.004fc590
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6d22d8]
push 6
call fcn.004fc590
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
mov ecx, 0x6d4d48
call fcn.00502f50
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
push 0
mov ecx, 0x5f96e8
call fcn.0045dfb0
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 0x4fae48
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 [0x6d5820]
cmp word [ebp - 0x224], ax
jne 0x4fae43
mov ecx, dword [ebp - 0x22c]
cmp word [ebp - 0x214], cx
jne 0x4fae43
mov edx, dword [ebp - 0x228]
cmp word [ebp - 0x212], dx
jne 0x4fae43
mov esi, dword [ebp - 0x230]
cmp word [ebp - 0x20e], si
jne 0x4fae43
mov edi, dword [ebp - 0x238]
cmp word [ebp - 0x20c], di
jne 0x4fae43
mov ebx, dword [ebp - 0x234]
cmp word [ebp - 0x20a], bx
jne 0x4fae43
mov ax, word [ebp - 0x208]
cmp ax, word [ebp - 0x220]
je 0x4faead
mov eax, dword [0x6d5820]
movzx eax, ax
jmp 0x4fae4f
movzx eax, word [0x6d5820]
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.0058f38c
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.0058f38c
mov eax, dword [0x6d1ecc]
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 0x4fb07d
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 0x4fb055
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, 0x6c4828
push eax
push 0xc9
call fcn.0044af50
push eax
push 0x17
push 0x6c4828
call fcn.0044a830
add esp, 0x10
jmp 0x4fb09c
push 0xc8
mov ecx, 0x6c4828
call fcn.0044af50
push eax
push 0x17
push 0x6c4828
call fcn.0044a830
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.0x4fa8d2.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 0x4fb0d0
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.0058de24
mov esp, ebp
pop ebp
ret 4
push 1
mov ecx, 0x6d7290
call fcn.0052d900
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
push 0
mov ecx, 0x6d7290
call fcn.0052d900
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x6d22d4]
test eax, eax
je case.0x4fa8d2.20
mov eax, dword [eax + 0x22cf8]
test eax, eax
je case.0x4fa8d2.20
cmp dword [eax + 0x1c], 0
je case.0x4fa8d2.20
push 1
mov ecx, 0x6c4828
call fcn.0044adc0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x6d22d4]
test eax, eax
je case.0x4fa8d2.20
mov eax, dword [eax + 0x22cf8]
test eax, eax
je case.0x4fa8d2.20
cmp dword [eax + 0x1c], 0
je case.0x4fa8d2.20
push 0
mov ecx, 0x6c4828
call fcn.0044adc0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x6d238c]
test ecx, ecx
je case.0x4fa8d2.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.0058de24
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x6d7294]
cmp dword [eax + 0x312], 0
jne case.0x4fa8d2.20
cmp dword [eax + 0x3f6], 0
jne case.0x4fa8d2.20
mov ecx, 0x5fb5b8
call fcn.0051f140
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
cmp dword [0x6d4d60], 4
je case.0x4fa8d2.20
mov ecx, dword [0x6d24c0]
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.0058de24
mov esp, ebp
pop ebp
ret 4
cmp dword [0x6d4d60], 4
je case.0x4fa8d2.20
mov eax, dword [0x6d24c0]
mov cx, word [ecx + 0xa84]
mov word [eax + 0x978], cx
mov ecx, dword [0x6d24c0]
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.0058de24
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x6d7294]
cmp dword [eax + 0x3f6], 1
jne case.0x4fa8d2.20
mov ecx, dword [0x6d22b8]
cmp dword [ecx + 0xe], 1
mov eax, dword [ecx]
jne 0x4fb29e
push 0
call dword [eax + 8]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4
mov ax, word [0x6d58dc]
cmp ax, 5
je case.0x4fa8d2.20
movzx esi, ax
call fcn.0042cc30
mov dword [eax + 0x222], esi
call fcn.0042cc30
xor ebx, ebx
cmp dword [eax + 0xe6], ebx
sete bl
call fcn.0042cc30
mov dword [eax + 0xe6], ebx
call fcn.0042cc30
cmp dword [eax + 0xe6], 0
je 0x4fb464
call fcn.0042cc30
cmp dword [eax + 0x176], 0
je 0x4fb3b0
mov esi, dword [0x6d7294]
mov edi, dword [esi]
call fcn.0042cc30
add eax, 0xda
mov ecx, esi
push eax
call dword [edi + 0x88]
call fcn.0042cc30
movss xmm0, dword [eax + 0xda]
divss xmm0, dword [0x5bf038]
call fcn.0058fb00
mov esi, eax
call fcn.0042cc30
mov dword [eax + 0x21a], esi
call fcn.0042cc30
movss xmm0, dword [eax + 0xe2]
divss xmm0, dword [0x5bf038]
call fcn.0058fb00
mov esi, eax
call fcn.0042cc30
mov dword [eax + 0x21e], esi
mov esi, dword [0x6d259c]
mov ecx, 0x6c4828
push 0x902
call fcn.0044af50
push eax
mov ecx, esi
call fcn.0044d040
mov ecx, dword [0x6d259c]
push 1
mov eax, dword [ecx]
call dword [eax + 8]
mov eax, dword [0x6d259c]
mov dword [eax + 0x2c], 1
call fcn.0042cc30
mov eax, dword [eax + 0x21e]
push eax
call fcn.0042cc30
mov ecx, 0x6c4828
mov eax, dword [eax + 0x21a]
push eax
push 0x900
call fcn.0044af50
push eax
push 0x2b
push 0x6c4828
call fcn.0044a830
movzx esi, word [0x6d58dc]
add esp, 0x14
call fcn.0042cc30
mov dword [eax + 0x222], esi
call fcn.0042cc30
mov dword [eax + 0x1d72], 0
call fcn.0042cc30
mov dword [eax + 0x1d76], 0
mov ecx, dword [0x6d2544]
cmp dword [ecx + 0xe], 0
je 0x4fb4f6
push 1
jmp 0x4fb4e5
mov esi, dword [0x6d259c]
mov ecx, 0x6c4828
push 0x903
call fcn.0044af50
push eax
mov ecx, esi
call fcn.0044d040
mov ecx, dword [0x6d259c]
push 1
mov eax, dword [ecx]
call dword [eax + 8]
mov eax, dword [0x6d259c]
mov ecx, 0x6c4828
push 0x901
mov dword [eax + 0x2c], 1
call fcn.0044af50
push eax
push 0x2b
push 0x6c4828
call fcn.0044a830
add esp, 0xc
call fcn.0042cc30
mov dword [eax + 0x1d72], 0
call fcn.0042cc30
mov dword [eax + 0x1d76], 0
mov ecx, dword [0x6d2544]
cmp dword [ecx + 0xe], 0
je 0x4fb4f6
push 0
mov eax, dword [ecx]
push 0x39e
call dword [eax + 0x60]
mov ecx, eax
call fcn.004b4120
call fcn.0042cc30
mov ecx, eax
call fcn.0042c960
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058de24
mov esp, ebp
pop ebp
ret 4