Function at 0x4ec310
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 [0x66e240]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp eax, 0x29
ja case.default.0x4ec239
push ebx
push esi
push edi
jmp dword [eax*4 + 0x4eca9b]
push 0
jmp 0x4ec266
push 1
jmp 0x4ec266
push 2
jmp 0x4ec266
push 3
jmp 0x4ec266
push 4
jmp 0x4ec266
push 5
jmp 0x4ec266
push 6
jmp 0x4ec266
push 7
jmp 0x4ec266
push 8
jmp 0x4ec266
push 9
mov ecx, 0x6b5580
call fcn.0052ebb1
jmp case.0x4ec239.20
push 0
jmp 0x4ec283
push 1
jmp 0x4ec283
push 2
jmp 0x4ec283
push 3
mov ecx, dword [0x6a74f4]
call fcn.0052bf7d
jmp case.0x4ec239.20
push 3
jmp 0x4ec2f1
push 2
jmp 0x4ec2f1
push 4
jmp 0x4ec2f1
push 7
jmp 0x4ec2f1
push 5
jmp 0x4ec2f1
mov ecx, 0x5d0238
call fcn.004ba4e8
test eax, eax
jne case.0x4ec239.20
push 0xb
jmp 0x4ec2f1
push 0xa
jmp 0x4ec2f1
push 8
jmp 0x4ec2f1
push 9
jmp 0x4ec2f1
mov ecx, 0x5d0be8
call fcn.0051b716
jmp case.0x4ec239.20
mov ecx, 0x6a8c04
call fcn.004a477e
jmp case.0x4ec239.20
push 0
jmp 0x4ec2f1
push 1
jmp 0x4ec2f1
push 6
mov ecx, dword [0x6a74a8]
call fcn.004ed849
jmp case.0x4ec239.20
mov ecx, 0x6aaa50
call fcn.004f317b
jmp case.0x4ec239.20
xor ebx, ebx
mov ecx, 0x69e920
push ebx
call fcn.0046fb46
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 0x4ec4bc
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 [0x6ab520]
cmp word [ebp - 0x228], cx
jne 0x4ec4b7
mov ax, word [ebp - 0x214]
cmp ax, word [ebp - 0x220]
jne 0x4ec4b7
mov ax, word [ebp - 0x212]
cmp ax, word [ebp - 0x224]
jne 0x4ec4b7
mov edi, dword [ebp - 0x22c]
cmp word [ebp - 0x20e], di
jne 0x4ec4b7
mov esi, dword [ebp - 0x234]
cmp word [ebp - 0x20c], si
jne 0x4ec4b7
mov edx, dword [ebp - 0x230]
cmp word [ebp - 0x20a], dx
jne 0x4ec4b7
mov ecx, dword [ebp - 0x238]
cmp word [ebp - 0x208], cx
jne 0x4ec4b1
mov eax, dword [ebp - 0x21c]
jmp 0x4ec520
mov ecx, dword [0x6ab520]
movzx eax, cx
jmp 0x4ec4c3
movzx eax, word [0x6ab520]
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.005623bc
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.005623bc
mov eax, dword [0x6a6e44]
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 0x4ec6e1
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 0x4ec6bb
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, 0x699e20
push eax
push 0xc9
mov ecx, esi
call fcn.00461659
push eax
push 0x17
push esi
call fcn.00460fd9
add esp, 0x10
jmp 0x4ec6fe
mov esi, 0x699e20
push 0xc8
mov ecx, esi
call fcn.00461659
push eax
push 0x17
push esi
call fcn.00460fd9
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.0x4ec239.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 0x4ec72e
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.0x4ec239.20
push 1
jmp 0x4ec76e
push 0
mov ecx, 0x6b3fb0
call fcn.0051259a
jmp case.0x4ec239.20
mov eax, dword [0x6a74a4]
test eax, eax
je case.0x4ec239.20
mov eax, dword [eax + 0x23418]
test eax, eax
je case.0x4ec239.20
cmp dword [eax + 0x1c], 0
je case.0x4ec239.20
push 1
jmp 0x4ec7cd
mov eax, dword [0x6a74a4]
test eax, eax
je case.0x4ec239.20
mov eax, dword [eax + 0x23418]
test eax, eax
je case.0x4ec239.20
cmp dword [eax + 0x1c], 0
je case.0x4ec239.20
push 0
mov ecx, 0x699e20
call fcn.0046152d
jmp case.0x4ec239.20
mov ecx, dword [0x6a755c]
test ecx, ecx
je case.0x4ec239.20
mov edx, dword [ecx]
xor eax, eax
cmp dword [ecx + 0xe], eax
sete al
push eax
call dword [edx + 8]
jmp case.0x4ec239.20
mov eax, dword [0x6b3fb4]
cmp dword [eax + 0x310], 0
jne case.0x4ec239.20
cmp dword [eax + 0x3f3], 0
jne case.0x4ec239.20
mov ecx, 0x5d0810
call fcn.00507402
jmp case.0x4ec239.20
cmp dword [0x6aaa68], 4
je case.0x4ec239.20
mov ecx, dword [0x6a7690]
mov eax, dword [ecx]
jmp 0x4ec894
cmp dword [0x6aaa68], 4
je case.0x4ec239.20
mov eax, dword [0x6a7690]
mov cx, word [ecx + 0xa84]
mov word [eax + 0x998], cx
mov ecx, dword [0x6a7690]
mov eax, dword [ecx]
push 1
call dword [eax + 8]
jmp case.0x4ec239.20
mov eax, dword [0x6b3fb4]
cmp dword [eax + 0x3f3], 1
jne case.0x4ec239.20
mov ecx, dword [0x6a7488]
cmp dword [ecx + 0xe], 1
mov eax, dword [ecx]
jne 0x4ec86a
push 0
jmp 0x4ec86c
mov ax, word [0x6ab5d4]
cmp ax, 5
je case.0x4ec239.20
movzx esi, ax
call fcn.00449665
mov dword [eax + 0x222], esi
call fcn.00449665
xor ebx, ebx
xor edi, edi
cmp dword [eax + 0xe6], edi
sete bl
call fcn.00449665
mov dword [eax + 0xe6], ebx
call fcn.00449665
cmp dword [eax + 0xe6], edi
je 0x4ec9fb
call fcn.00449665
cmp dword [eax + 0x176], edi
je 0x4ec95c
mov esi, dword [0x6b3fb4]
mov edi, dword [esi]
call fcn.00449665
add eax, 0xda
mov ecx, esi
push eax
call dword [edi + 0x88]
call fcn.00449665
movss xmm0, dword [eax + 0xda]
divss xmm0, dword [0x58d178]
call fcn.00562b30
mov esi, eax
call fcn.00449665
mov dword [eax + 0x21a], esi
call fcn.00449665
movss xmm0, dword [eax + 0xe2]
divss xmm0, dword [0x58d178]
call fcn.00562b30
mov esi, eax
call fcn.00449665
xor edi, edi
mov dword [eax + 0x21e], esi
mov esi, dword [0x6a7748]
mov ebx, 0x699e20
push 0x902
mov ecx, ebx
call fcn.00461659
push eax
mov ecx, esi
call fcn.0046314f
mov ecx, dword [0x6a7748]
xor esi, esi
inc esi
push esi
mov eax, dword [ecx]
call dword [eax + 8]
mov eax, dword [0x6a7748]
mov dword [eax + 0x2c], esi
call fcn.00449665
push dword [eax + 0x21e]
call fcn.00449665
mov ecx, ebx
push dword [eax + 0x21a]
push 0x900
call fcn.00461659
push eax
push 0x17
push ebx
call fcn.00460fd9
movzx esi, word [0x6ab5d4]
add esp, 0x14
call fcn.00449665
mov dword [eax + 0x222], esi
call fcn.00449665
mov dword [eax + 0x1d72], edi
call fcn.00449665
mov dword [eax + 0x1d76], edi
mov ecx, dword [0x6a76f4]
cmp dword [ecx + 0xe], edi
je 0x4eca7c
push 1
jmp 0x4eca6b
mov esi, dword [0x6a7748]
mov ebx, 0x699e20
push 0x903
mov ecx, ebx
call fcn.00461659
push eax
mov ecx, esi
call fcn.0046314f
mov ecx, dword [0x6a7748]
xor esi, esi
inc esi
push esi
mov eax, dword [ecx]
call dword [eax + 8]
mov eax, dword [0x6a7748]
mov ecx, ebx
push 0x901
mov dword [eax + 0x2c], esi
call fcn.00461659
push eax
push 0x17
push ebx
call fcn.00460fd9
add esp, 0xc
call fcn.00449665
mov dword [eax + 0x1d72], edi
call fcn.00449665
mov dword [eax + 0x1d76], edi
mov ecx, dword [0x6a76f4]
cmp dword [ecx + 0xe], edi
je 0x4eca7c
push edi
mov eax, dword [ecx]
push 0x39f
call dword [eax + 0x60]
mov ecx, eax
call fcn.004af841
call fcn.00449665
mov ecx, eax
call fcn.0044948a
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00560d94
mov esp, ebp
pop ebp
ret 4