Function at 0x526258
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 [0x6d5760]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp eax, 0x29
ja case.default.0x525eb2
push ebx
push esi
push edi
jmp dword [eax*4 + 0x526af8]
push 0
mov ecx, 0x719968
call fcn.0057a210
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
push 1
mov ecx, 0x719968
call fcn.0057a210
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
push 2
mov ecx, 0x719968
call fcn.0057a210
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
push 3
mov ecx, 0x719968
call fcn.0057a210
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
push 4
mov ecx, 0x719968
call fcn.0057a210
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
push 5
mov ecx, 0x719968
call fcn.0057a210
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
push 6
mov ecx, 0x719968
call fcn.0057a210
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
push 7
mov ecx, 0x719968
call fcn.0057a210
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
push 8
mov ecx, 0x719968
call fcn.0057a210
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
push 9
mov ecx, 0x719968
call fcn.0057a210
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x7136a4]
push 0
call fcn.00576f70
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x7136a4]
push 1
call fcn.00576f70
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x7136a4]
push 2
call fcn.00576f70
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x7136a4]
push 3
call fcn.00576f70
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x713658]
push 3
call fcn.00527b90
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x713658]
push 2
call fcn.00527b90
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x713658]
push 4
call fcn.00527b90
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x713658]
push 7
call fcn.00527b90
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x713658]
push 5
call fcn.00527b90
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
mov ecx, 0x6301e0
call fcn.004eb880
test eax, eax
jne case.0x525eb2.20
mov ecx, dword [0x713658]
push 0xb
call fcn.00527b90
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x713658]
push 0xa
call fcn.00527b90
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x713658]
push 8
call fcn.00527b90
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x713658]
push 9
call fcn.00527b90
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
mov ecx, 0x637e38
call fcn.00561750
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
mov ecx, 0x62f74c
call fcn.004ce240
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x713658]
push 0
call fcn.00527b90
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x713658]
push 1
call fcn.00527b90
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x713658]
push 6
call fcn.00527b90
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
mov ecx, 0x716118
call fcn.0052e520
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
push 0
mov ecx, 0x62ebb8
call fcn.004890c0
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 0x526428
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 [0x716bf0]
cmp word [ebp - 0x224], ax
jne 0x526423
mov ecx, dword [ebp - 0x22c]
cmp word [ebp - 0x214], cx
jne 0x526423
mov edx, dword [ebp - 0x228]
cmp word [ebp - 0x212], dx
jne 0x526423
mov esi, dword [ebp - 0x230]
cmp word [ebp - 0x20e], si
jne 0x526423
mov edi, dword [ebp - 0x238]
cmp word [ebp - 0x20c], di
jne 0x526423
mov ebx, dword [ebp - 0x234]
cmp word [ebp - 0x20a], bx
jne 0x526423
mov ax, word [ebp - 0x208]
cmp ax, word [ebp - 0x220]
je 0x52648d
mov eax, dword [0x716bf0]
movzx eax, ax
jmp 0x52642f
movzx eax, word [0x716bf0]
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.005b7fdc
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.005b7fdc
mov eax, dword [0x713240]
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 0x52665d
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 0x526635
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, 0x705ae0
push eax
push 0xc9
call fcn.00476940
push eax
push 0x17
push 0x705ae0
call fcn.00476230
add esp, 0x10
jmp 0x52667c
push 0xc8
mov ecx, 0x705ae0
call fcn.00476940
push eax
push 0x17
push 0x705ae0
call fcn.00476230
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.0x525eb2.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 0x5266b0
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.005b6a74
mov esp, ebp
pop ebp
ret 4
push 1
mov ecx, 0x718690
call fcn.00556de0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
push 0
mov ecx, 0x718690
call fcn.00556de0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x713654]
test eax, eax
je case.0x525eb2.20
mov eax, dword [eax + 0x22cf8]
test eax, eax
je case.0x525eb2.20
cmp dword [eax + 0x1c], 0
je case.0x525eb2.20
push 1
mov ecx, 0x705ae0
call fcn.004767c0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x713654]
test eax, eax
je case.0x525eb2.20
mov eax, dword [eax + 0x22cf8]
test eax, eax
je case.0x525eb2.20
cmp dword [eax + 0x1c], 0
je case.0x525eb2.20
push 0
mov ecx, 0x705ae0
call fcn.004767c0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0x71370c]
test ecx, ecx
je case.0x525eb2.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.005b6a74
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x718694]
cmp dword [eax + 0x312], 0
jne case.0x525eb2.20
cmp dword [eax + 0x3f6], 0
jne case.0x525eb2.20
mov ecx, 0x630a80
call fcn.00548670
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
cmp dword [0x716130], 4
je case.0x525eb2.20
mov ecx, dword [0x713840]
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.005b6a74
mov esp, ebp
pop ebp
ret 4
cmp dword [0x716130], 4
je case.0x525eb2.20
mov eax, dword [0x713840]
mov cx, word [ecx + 0xa84]
mov word [eax + 0x978], cx
mov ecx, dword [0x713840]
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.005b6a74
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x718694]
cmp dword [eax + 0x3f6], 1
jne case.0x525eb2.20
mov ecx, dword [0x713638]
cmp dword [ecx + 0xe], 1
mov eax, dword [ecx]
jne 0x52687e
push 0
call dword [eax + 8]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4
mov ax, word [0x716c9c]
cmp ax, 5
je case.0x525eb2.20
movzx esi, ax
call fcn.00458810
mov dword [eax + 0x222], esi
call fcn.00458810
xor ebx, ebx
cmp dword [eax + 0xe6], ebx
sete bl
call fcn.00458810
mov dword [eax + 0xe6], ebx
call fcn.00458810
cmp dword [eax + 0xe6], 0
je 0x526a44
call fcn.00458810
cmp dword [eax + 0x176], 0
je 0x526990
mov esi, dword [0x718694]
mov edi, dword [esi]
call fcn.00458810
add eax, 0xda
mov ecx, esi
push eax
call dword [edi + 0x88]
call fcn.00458810
movss xmm0, dword [eax + 0xda]
divss xmm0, dword [0x5e9138]
call fcn.005b8750
mov esi, eax
call fcn.00458810
mov dword [eax + 0x21a], esi
call fcn.00458810
movss xmm0, dword [eax + 0xe2]
divss xmm0, dword [0x5e9138]
call fcn.005b8750
mov esi, eax
call fcn.00458810
mov dword [eax + 0x21e], esi
mov esi, dword [0x713918]
mov ecx, 0x705ae0
push 0x902
call fcn.00476940
push eax
mov ecx, esi
call fcn.00478a50
mov ecx, dword [0x713918]
push 1
mov eax, dword [ecx]
call dword [eax + 8]
mov eax, dword [0x713918]
mov dword [eax + 0x2c], 1
call fcn.00458810
mov eax, dword [eax + 0x21e]
push eax
call fcn.00458810
mov ecx, 0x705ae0
mov eax, dword [eax + 0x21a]
push eax
push 0x900
call fcn.00476940
push eax
push 0x2b
push 0x705ae0
call fcn.00476230
movzx esi, word [0x716c9c]
add esp, 0x14
call fcn.00458810
mov dword [eax + 0x222], esi
call fcn.00458810
mov dword [eax + 0x1d72], 0
call fcn.00458810
mov dword [eax + 0x1d76], 0
mov ecx, dword [0x7138c0]
cmp dword [ecx + 0xe], 0
je 0x526ad6
push 1
jmp 0x526ac5
mov esi, dword [0x713918]
mov ecx, 0x705ae0
push 0x903
call fcn.00476940
push eax
mov ecx, esi
call fcn.00478a50
mov ecx, dword [0x713918]
push 1
mov eax, dword [ecx]
call dword [eax + 8]
mov eax, dword [0x713918]
mov ecx, 0x705ae0
push 0x901
mov dword [eax + 0x2c], 1
call fcn.00476940
push eax
push 0x2b
push 0x705ae0
call fcn.00476230
add esp, 0xc
call fcn.00458810
mov dword [eax + 0x1d72], 0
call fcn.00458810
mov dword [eax + 0x1d76], 0
mov ecx, dword [0x7138c0]
cmp dword [ecx + 0xe], 0
je 0x526ad6
push 0
mov eax, dword [ecx]
push 0x39e
call dword [eax + 0x60]
mov ecx, eax
call fcn.004df360
call fcn.00458810
mov ecx, eax
call fcn.00458540
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a74
mov esp, ebp
pop ebp
ret 4