Function at 0x4edd66
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x238
mov eax, dword [0xa37210]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp eax, 0x28
ja case.0x4ed5ff.20
jmp dword [eax*4 + 0x4edf88]
push 0
mov ecx, 0xa6b910
call fcn.00542870
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
push 1
mov ecx, 0xa6b910
call fcn.00542870
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
push 2
mov ecx, 0xa6b910
call fcn.00542870
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
push 3
mov ecx, 0xa6b910
call fcn.00542870
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
push 4
mov ecx, 0xa6b910
call fcn.00542870
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
push 5
mov ecx, 0xa6b910
call fcn.00542870
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
push 6
mov ecx, 0xa6b910
call fcn.00542870
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
push 7
mov ecx, 0xa6b910
call fcn.00542870
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
push 8
mov ecx, 0xa6b910
call fcn.00542870
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
push 9
mov ecx, 0xa6b910
call fcn.00542870
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0xa65480]
push 0
call fcn.0053fe00
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0xa65480]
push 1
call fcn.0053fe00
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0xa65480]
push 2
call fcn.0053fe00
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0xa65480]
push 3
call fcn.0053fe00
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0xa65430]
push 3
call fcn.004eef30
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0xa65430]
push 2
call fcn.004eef30
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0xa65430]
push 4
call fcn.004eef30
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0xa65430]
push 7
call fcn.004eef30
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0xa65430]
push 5
call fcn.004eef30
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
mov ecx, 0x80f0c0
call fcn.004b76c0
test eax, eax
jne case.0x4ed5ff.20
mov ecx, dword [0xa65430]
push 0xb
call fcn.004eef30
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0xa65430]
push 0xa
call fcn.004eef30
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0xa65430]
push 8
call fcn.004eef30
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0xa65430]
push 9
call fcn.004eef30
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
mov ecx, 0x8e2750
call fcn.0052a1d0
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
mov ecx, 0x7d54a4
call fcn.0049e180
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0xa65430]
push 1
call fcn.004eef30
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0xa65430]
push 0
call fcn.004eef30
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0xa65430]
push 6
call fcn.004eef30
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
mov ecx, 0xa67ef8
call fcn.004f54c0
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
push ebx
push esi
push edi
push 0
mov ecx, 0x71a8c8
call fcn.0045c910
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 0x4edb21
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 [0xa68abc]
cmp word [ebp - 0x224], ax
jne 0x4edb1c
mov ecx, dword [ebp - 0x22c]
cmp word [ebp - 0x214], cx
jne 0x4edb1c
mov edx, dword [ebp - 0x228]
cmp word [ebp - 0x212], dx
jne 0x4edb1c
mov esi, dword [ebp - 0x230]
cmp word [ebp - 0x20e], si
jne 0x4edb1c
mov edi, dword [ebp - 0x238]
cmp word [ebp - 0x20c], di
jne 0x4edb1c
mov ebx, dword [ebp - 0x234]
cmp word [ebp - 0x20a], bx
jne 0x4edb1c
mov ax, word [ebp - 0x208]
cmp ax, word [ebp - 0x220]
je 0x4edb86
mov eax, dword [0xa68abc]
movzx eax, ax
jmp 0x4edb28
movzx eax, word [0xa68abc]
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.0057cecc
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.0057cecc
mov eax, dword [0xa650a4]
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 0x4edd56
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 0x4edd2e
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, 0xa59940
push eax
push 0xc9
call fcn.004489d0
push eax
push 0x17
push 0xa59940
call fcn.004482c0
add esp, 0x10
jmp 0x4edd75
push 0xc8
mov ecx, 0xa59940
call fcn.004489d0
push eax
push 0x17
push 0xa59940
call fcn.004482c0
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 0x4eddd7
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 0x4edda2
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.0057b964
mov esp, ebp
pop ebp
ret 4
push 1
mov ecx, 0xa6a650
call fcn.0051f1a0
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
push 0
mov ecx, 0xa6a650
call fcn.0051f1a0
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0xa6542c]
test eax, eax
je case.0x4ed5ff.20
mov eax, dword [eax + 0x20476]
test eax, eax
je case.0x4ed5ff.20
cmp dword [eax + 0x1c], 0
je case.0x4ed5ff.20
push 1
mov ecx, 0xa59940
call fcn.00448850
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0xa6542c]
test eax, eax
je case.0x4ed5ff.20
mov eax, dword [eax + 0x20476]
test eax, eax
je case.0x4ed5ff.20
cmp dword [eax + 0x1c], 0
je case.0x4ed5ff.20
push 0
mov ecx, 0xa59940
call fcn.00448850
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [0xa654e8]
test ecx, ecx
je case.0x4ed5ff.20
mov edx, dword [ecx]
xor eax, eax
cmp dword [ecx + 0xe], eax
sete al
push eax
call dword [edx + 8]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0xa6a654]
cmp dword [eax + 0x312], 0
jne case.0x4ed5ff.20
cmp dword [eax + 0x402], 0
jne case.0x4ed5ff.20
mov ecx, 0x8a0a04
call fcn.00510470
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
cmp dword [0xa67f10], 4
je case.0x4ed5ff.20
mov ecx, dword [0xa6561c]
mov eax, dword [ecx]
push 0
call dword [eax + 8]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
cmp dword [0xa67f10], 4
je case.0x4ed5ff.20
mov eax, dword [0xa6561c]
mov cx, word [ecx + 0xa4c]
mov word [eax + 0x8c2], cx
mov ecx, dword [0xa6561c]
mov eax, dword [ecx]
push 1
call dword [eax + 8]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057b964
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0xa6a654]
cmp dword [eax + 0x402], 1
jne case.0x4ed5ff.20
mov ecx, dword [0xa65414]
cmp dword [ecx + 0xe], 1
mov eax, dword [ecx]
jne 0x4edf4f
jmp 0x4edf12