Function at 0x4bf0f0
Capabilities:
Create directory
Delete file
Read file on windows
Resolve function by parsing pe exports
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
movzx edx, ax
cmp edx, 0xffffffff
je 0x447e1e
cmp dword [0x6e14f8], 4
je 0x447e1e
mov dword [esp + 4], eax
jmp fcn.004475c0
ret 4
mov eax, dword [esp + 4]
sub esp, 0x240
cmp eax, 0x28
ja case.default.0x4bf106
push ebx
push esi
push edi
jmp dword [eax*4 + 0x4bfb5c]
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 0
mov ecx, 0x6b50e0
jmp fcn.004b9510
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 1
mov ecx, 0x6b50e0
jmp fcn.004b9510
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 2
mov ecx, 0x6b50e0
jmp fcn.004b9510
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 3
mov ecx, 0x6b50e0
jmp fcn.004b9510
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 4
mov ecx, 0x6b50e0
jmp fcn.004b9510
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 5
mov ecx, 0x6b50e0
jmp fcn.004b9510
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 6
mov ecx, 0x6b50e0
jmp fcn.004b9510
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 7
mov ecx, 0x6b50e0
jmp fcn.004b9510
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 8
mov ecx, 0x6b50e0
jmp fcn.004b9510
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 9
mov ecx, 0x6b50e0
jmp fcn.004b9510
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 0
mov ecx, dword [0x6a6358]
jmp fcn.00462f10
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 1
mov ecx, dword [0x6a6358]
jmp fcn.00462f10
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 2
mov ecx, dword [0x6a6358]
jmp fcn.00462f10
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 3
mov ecx, dword [0x6a6358]
jmp fcn.00462f10
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 3
mov ecx, dword [0x6a630c]
jmp 0x447e00
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 2
mov ecx, dword [0x6a630c]
jmp 0x447e00
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 4
mov ecx, dword [0x6a630c]
jmp 0x447e00
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 7
mov ecx, dword [0x6a630c]
jmp 0x447e00
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 5
mov ecx, dword [0x6a630c]
jmp 0x447e00
mov ecx, 0x6b3890
call fcn.0043e870
test eax, eax
jne case.0x4bf106.20
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 0xb
mov ecx, dword [0x6a630c]
jmp 0x447e00
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 0xa
mov ecx, dword [0x6a630c]
jmp 0x447e00
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 8
mov ecx, dword [0x6a630c]
jmp 0x447e00
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 9
mov ecx, dword [0x6a630c]
jmp 0x447e00
mov ecx, 0x6b5340
call fcn.004bc6c0
pop edi
pop esi
pop ebx
add esp, 0x240
ret 4
mov ecx, 0x6c41d4
call fcn.00510380
pop edi
pop esi
pop ebx
add esp, 0x240
ret 4
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 1
mov ecx, dword [0x6a630c]
jmp 0x447e00
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 6
mov ecx, dword [0x6a630c]
jmp 0x447e00
mov ecx, 0x6e14e0
call fcn.0053c660
pop edi
pop esi
pop ebx
add esp, 0x240
ret 4
push ebp
xor ebx, ebx
push ebx
mov ecx, 0x6e1e08
call fcn.00548d80
push ebx
push str.ScreenShot
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [esp + 0x38]
push eax
mov dword [esp + 0x34], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push ebx
push 0x80
push 3
push ebx
push ebx
push 0x80000000
push 0x58f020
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [esp + 0x10], ebx
cmp esi, 0xffffffff
je 0x4bf56f
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
lea ecx, [esp + 0x14]
push ecx
push 2
lea edx, [esp + 0x3c]
push edx
push esi
call edi
push ebx
lea eax, [esp + 0x14]
push eax
push 2
lea ecx, [esp + 0x2c]
push ecx
push esi
call edi
push ebx
lea edx, [esp + 0x14]
push edx
push 2
lea eax, [esp + 0x34]
push eax
push esi
call edi
push ebx
lea ecx, [esp + 0x14]
push ecx
push 2
lea edx, [esp + 0x30]
push edx
push esi
call edi
push ebx
lea eax, [esp + 0x14]
push eax
push 2
lea ecx, [esp + 0x40]
push ecx
push esi
call edi
push ebx
lea edx, [esp + 0x14]
push edx
push 2
lea eax, [esp + 0x38]
push eax
push esi
call edi
push ebx
lea ecx, [esp + 0x14]
push ecx
push 2
lea edx, [esp + 0x28]
push edx
push esi
call edi
push ebx
lea eax, [esp + 0x14]
push eax
push 2
lea ecx, [esp + 0x24]
push ecx
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x30]
mov bx, word [esp + 0x44]
cmp cx, word [0x6a57c4]
jne 0x4bf561
mov dx, word [esp + 0x38]
cmp dx, word [esp + 0x20]
jne 0x4bf561
mov ebp, dword [esp + 0x28]
cmp word [esp + 0x3a], bp
jne 0x4bf561
mov edi, dword [esp + 0x24]
cmp word [esp + 0x3e], di
jne 0x4bf561
mov esi, dword [esp + 0x34]
cmp word [esp + 0x40], si
jne 0x4bf561
mov edx, dword [esp + 0x2c]
cmp word [esp + 0x42], dx
jne 0x4bf561
mov eax, dword [esp + 0x1c]
cmp bx, ax
je 0x4bf5b8
movzx eax, word [esp + 0x38]
mov dword [esp + 0x20], eax
movzx eax, bx
jmp 0x4bf57d
movzx edx, word [esp + 0x38]
movzx eax, word [esp + 0x44]
mov dword [esp + 0x20], edx
movzx edx, word [esp + 0x42]
movzx esi, word [esp + 0x40]
movzx edi, word [esp + 0x3e]
movzx ebp, word [esp + 0x3a]
movzx ecx, word [0x6a57c4]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x2c], edx
mov dword [esp + 0x34], esi
mov dword [esp + 0x18], 1
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], ebp
mov dword [esp + 0x30], ecx
movzx ebx, word [esp + 0x18]
push ebx
movzx eax, ax
push eax
movzx edx, dx
push edx
movzx eax, si
push eax
movzx edx, di
push edx
movzx eax, bp
push eax
movzx eax, word [esp + 0x38]
cdq
mov esi, 0x64
idiv esi
movzx ecx, cx
push edx
push ecx
lea edx, [esp + 0x70]
push str.ScreenShot_DarkStory__02d__02d_02d_02d__02d_02d_02d__03d.jpg
push edx
call fcn.00561680
movzx eax, word [esp + 0x40]
movzx ecx, word [esp + 0x44]
movzx edx, word [esp + 0x54]
push eax
movzx eax, word [esp + 0x60]
push ecx
movzx ecx, word [esp + 0x54]
push edx
movzx edx, word [esp + 0x5c]
push eax
movzx eax, word [esp + 0x58]
push ecx
push edx
cdq
mov ecx, esi
idiv ecx
lea eax, [esp + 0x190]
push edx
movzx edx, word [esp + 0x74]
push edx
push str.ScreenShot_DarkStory__02d__02d_02d_02d__02d_02d_02d__03d.txt
push eax
call fcn.00561680
mov eax, dword [0x6df2fc]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x10]
add esp, 0x50
push eax
call edx
mov ecx, dword [eax]
lea edx, [esp + 0x50]
push edx
push eax
mov eax, dword [ecx + 0xe8]
call eax
pop ebp
test eax, eax
je 0x4bf74a
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 esi, eax
cmp esi, 0xffffffff
je 0x4bf724
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
inc dword [esp + 0x14]
push 0
lea ecx, [esp + 0x10]
push ecx
push 2
lea edx, [esp + 0x38]
push edx
push esi
call edi
push 0
lea eax, [esp + 0x10]
push eax
push 2
lea ecx, [esp + 0x28]
push ecx
push esi
call edi
push 0
lea edx, [esp + 0x10]
push edx
push 2
lea eax, [esp + 0x30]
push eax
push esi
call edi
push 0
lea ecx, [esp + 0x10]
push ecx
push 2
lea edx, [esp + 0x2c]
push edx
push esi
call edi
push 0
lea eax, [esp + 0x10]
push eax
push 2
lea ecx, [esp + 0x3c]
push ecx
push esi
call edi
push 0
lea edx, [esp + 0x10]
push edx
push 2
lea eax, [esp + 0x34]
push eax
push esi
call edi
push 0
lea ecx, [esp + 0x10]
push ecx
push 2
lea edx, [esp + 0x24]
push edx
push esi
call edi
push 0
lea eax, [esp + 0x10]
push eax
push 2
lea ecx, [esp + 0x20]
push ecx
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [esp + 0x4c]
push edx
push 0xc9
mov ecx, 0x6b6198
call fcn.004c4980
push eax
push 0x1d
push 0x6b6198
call fcn.004c5ad0
add esp, 0x10
jmp 0x4bf769
push 0xc8
mov ecx, 0x6b6198
call fcn.004c4980
push eax
push 0x1d
push 0x6b6198
call fcn.004c5ad0
add esp, 0xc
push 0
lea eax, [esp + 0x50]
push eax
push 0x11
call dword [sym.imp.FreeImage.dll__FreeImage_Load_12]
mov esi, eax
test esi, esi
je case.0x4bf106.20
lea ecx, [esp + 0x4c]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [esp + 0x4c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4bf794
sub eax, edx
push 0x80
lea edx, [esp + 0x50]
lea eax, [esp + eax + 0x50]
push edx
push esi
mov word [eax - 3], 0x706a
mov byte [eax - 1], 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
add esp, 0x240
ret 4
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 1
mov ecx, 0x6b4198
jmp fcn.00495350
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 0
mov ecx, 0x6b4198
jmp fcn.00495350
mov eax, dword [0x6a6308]
test eax, eax
je case.0x4bf106.20
mov eax, dword [eax + 0x96dc]
test eax, eax
je case.0x4bf106.20
cmp dword [eax + 0x20], 0
je case.0x4bf106.20
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 1
mov ecx, 0x6b6198
jmp 0x4c4c10
mov eax, dword [0x6a6308]
test eax, eax
je case.0x4bf106.20
mov eax, dword [eax + 0x96dc]
test eax, eax
je case.0x4bf106.20
cmp dword [eax + 0x20], 0
je case.0x4bf106.20
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 0
mov ecx, 0x6b6198
jmp 0x4c4c10
mov ecx, dword [0x6a63c0]
test ecx, ecx
je case.0x4bf106.20
mov eax, dword [ecx]
xor edx, edx
cmp dword [ecx + 0x10], edx
pop edi
pop esi
sete dl
pop ebx
add esp, 0x240
mov dword [esp + 4], edx
mov eax, dword [eax + 8]
jmp eax
mov eax, dword [0x6b419c]
cmp dword [eax + 0x31c], 0
jne case.0x4bf106.20
cmp dword [eax + 0x404], 0
jne case.0x4bf106.20
mov ecx, 0x6c2688
call fcn.004f8750
pop edi
pop esi
pop ebx
add esp, 0x240
ret 4
cmp dword [0x6e14f8], 4
je case.0x4bf106.20
mov ecx, dword [0x6a6504]
mov edx, dword [ecx]
pop edi
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 0
mov eax, dword [edx + 8]
jmp eax
cmp dword [0x6e14f8], 4
je case.0x4bf106.20
mov cx, word [ecx + 0xbc4]
mov edx, dword [0x6a6504]
pop edi
mov word [edx + 0x258], cx
mov ecx, dword [0x6a6504]
mov eax, dword [ecx]
pop esi
pop ebx
add esp, 0x240
mov dword [esp + 4], 1
mov edx, dword [eax + 8]
jmp edx
mov ecx, dword [0x6b419c]
mov eax, 1
cmp dword [ecx + 0x404], eax
jne case.0x4bf106.20
mov ecx, dword [0x6a62f0]
mov edx, dword [ecx]
pop edi
pop esi
pop ebx
cmp dword [ecx + 0x10], eax
jne 0x4bf988
add esp, 0x240
mov dword [esp + 4], 0
mov eax, dword [edx + 8]
jmp eax
add esp, 0x240
mov dword [esp + 4], eax
mov eax, dword [edx + 8]
jmp eax
mov ax, word [0x6e112c]
cmp ax, 5
je case.0x4bf106.20
cmp ax, 0x36
je case.0x4bf106.20
movzx esi, ax
call fcn.004040a0
mov dword [eax + 0x230], esi
call fcn.004040a0
xor ecx, ecx
xor ebx, ebx
cmp dword [eax + 0xec], ebx
sete cl
mov esi, ecx
call fcn.004040a0
mov dword [eax + 0xec], esi
call fcn.004040a0
cmp dword [eax + 0xec], ebx
je 0x4bfaef
call fcn.004040a0
cmp dword [eax + 0x180], ebx
je 0x4bfa99
mov esi, dword [0x6b419c]
mov edi, dword [esi]
call fcn.004040a0
mov edx, dword [edi + 0x88]
add eax, 0xe0
push eax
mov ecx, esi
call edx
call fcn.004040a0
fld dword [eax + 0xe0]
fdiv qword [0x57f6d0]
fnstcw word [esp + 0x12]
movzx eax, word [esp + 0x12]
or eax, 0xc00
mov dword [esp + 0x18], eax
fldcw word [esp + 0x18]
fistp qword [esp + 0x44]
mov esi, dword [esp + 0x44]
fldcw word [esp + 0x12]
call fcn.004040a0
mov dword [eax + 0x228], esi
call fcn.004040a0
fld dword [eax + 0xe8]
fdiv qword [0x57f6d0]
fnstcw word [esp + 0x12]
movzx eax, word [esp + 0x12]
or eax, 0xc00
mov dword [esp + 0x44], eax
fldcw word [esp + 0x44]
fistp qword [esp + 0x44]
mov esi, dword [esp + 0x44]
fldcw word [esp + 0x12]
call fcn.004040a0
mov dword [eax + 0x22c], esi
push 0x9af
mov ecx, 0x6b6198
call fcn.004c4980
push eax
push 0x32
push 0x6b6198
call fcn.004c5ad0
movzx esi, word [0x6e112c]
add esp, 0xc
call fcn.004040a0
mov dword [eax + 0x230], esi
call fcn.004040a0
mov dword [eax + 0x1d80], ebx
call fcn.004040a0
mov dword [eax + 0x1d84], ebx
mov ecx, dword [0x6a65bc]
cmp dword [ecx + 0x10], ebx
je 0x4bfb43
push 1
jmp 0x4bfb30
push 0x9b0
mov ecx, 0x6b6198
call fcn.004c4980
push eax
push 0x32
push 0x6b6198
call fcn.004c5ad0
add esp, 0xc
call fcn.004040a0
mov dword [eax + 0x1d80], ebx
call fcn.004040a0
mov dword [eax + 0x1d84], ebx
mov ecx, dword [0x6a65bc]
cmp dword [ecx + 0x10], ebx
je 0x4bfb43
push ebx
mov eax, dword [ecx]
mov edx, dword [eax + 0x60]
push 0x3e0
call edx
mov ecx, eax
call fcn.0042fff0
call fcn.004040a0
mov ecx, eax
call fcn.004014d0
pop edi
pop esi
pop ebx
add esp, 0x240
ret 4
sub esp, 0x80
push esi
mov esi, ecx
mov eax, dword [esi + 0x28]
mov ecx, dword [eax + 0x96dc]
push 0x80
call fcn.004279d0
push eax
lea ecx, [esp + 0xc]
push ecx
call fcn.005123c0
add esp, 0xc
cmp byte [esp + 4], 0x2f
jne 0x4c4d5b
cmp dword [esp + 0x88], 0
mov eax, dword [esi + 0x47d8]
mov ecx, eax
je 0x4c4ce6
jmp 0x4c4c60
inc eax
mov dword [esi + 0x47d8], eax
cmp eax, 5
jle 0x4c4c76
mov dword [esi + 0x47d8], 0
mov eax, dword [esi + 0x47d8]
mov edx, eax
shl edx, 4
add edx, esi
cmp byte [eax + edx + 0x4781], 0
jne 0x4c4c9b
cmp eax, ecx
jne 0x4c4c60
pop esi
add esp, 0x80
ret 4
mov ecx, eax
shl ecx, 4
add ecx, esi
lea edx, [eax + ecx + 0x4781]
push edx
lea eax, [esp + 8]
push 0x58f604
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov edx, dword [esi + 0x28]
add esp, 0xc
lea ecx, [esp + 4]
push ecx
mov ecx, dword [edx + 0x96dc]
call fcn.00427a20
push 0
mov ecx, 0x6c418c
call fcn.0050f720
pop esi
add esp, 0x80
ret 4
mov edx, 4
push edi
lea esp, [esp]
dec eax
mov dword [esi + 0x47d8], eax
jns 0x4c4cff
mov dword [esi + 0x47d8], edx
mov eax, dword [esi + 0x47d8]
mov edi, eax
shl edi, 4
add edi, esi
cmp byte [eax + edi + 0x4781], 0
jne 0x4c4d25
cmp eax, ecx
jne 0x4c4cf0
pop edi
pop esi
add esp, 0x80
ret 4
mov ecx, eax
shl ecx, 4
add ecx, esi
lea edx, [eax + ecx + 0x4781]
push edx
lea eax, [esp + 0xc]
push 0x58f60c
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov edx, dword [esi + 0x28]
add esp, 0xc
lea ecx, [esp + 8]
push ecx
mov ecx, dword [edx + 0x96dc]
call fcn.00427a20
pop edi
pop esi
add esp, 0x80
ret 4