Function at 0x5e6314
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xcc
mov eax, dword [0x762dc0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x7a13d4]
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0xb8], ecx
lea ecx, [ebp - 0xa4]
mov edx, dword [eax]
push ecx
push 0
push 0
push eax
mov dword [ebp - 0xac], ebx
call dword [edx + 0x40]
test eax, eax
jns 0x5e628e
push eax
push str.Failed_to_get_back_buffer__0x_08x_
call fcn.005aaeb0
add esp, 8
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0065b5b4
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp - 0xa4]
lea edx, [ebp - 0xa0]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x20]
test eax, eax
jns 0x5e62d6
push eax
push str.Failed_to_get_surface_desc__0x_08x_
call fcn.005aaeb0
mov ecx, dword [ebp - 0xa4]
add esp, 8
test ecx, ecx
je 0x5e62c3
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0065b5b4
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 0xa0]
push esi
mov esi, dword [ebp - 0x84]
push edi
mov edi, dword [ebp - 0x88]
lea eax, [ecx - 0x1a]
mov dword [ebp - 0xc0], edi
mov dword [ebp - 0xb4], esi
cmp eax, 5
ja case.0x5e6305.28
movzx eax, byte [eax + 0x5e6754]
jmp dword [eax*4 + 0x5e674c]
push ecx
push str.Unsupported_BackBuffer_Format__d_._Please_contact_Metin_2_Administrator.
jmp 0x5e6338
mov eax, dword [ebp - 0xa4]
lea edx, [ebp - 0xcc]
push 0x8810
push 0
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x24]
test eax, eax
jns 0x5e6365
push eax
push str.Failed_to_lock_the_surface__0x_08x_
call fcn.005aaeb0
mov ecx, dword [ebp - 0xa4]
add esp, 8
test ecx, ecx
je 0x5e6350
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0065b5b4
mov esp, ebp
pop ebp
ret 4
mov eax, esi
imul eax, edi
lea eax, [eax + eax*2]
push eax
call fcn.006551fb
add esp, 4
mov dword [ebp - 0xc4], eax
test eax, eax
jne 0x5e63c4
mov eax, dword [ebp - 0xa4]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x28]
mov eax, dword [ebp - 0xa4]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push str.Failed_to_allocate_screenshot_buffer
mov dword [ebp - 0xa4], 0
call fcn.005aaeb0
add esp, 4
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0065b5b4
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 0xc8]
mov dword [ebp - 0xa8], ecx
test esi, esi
je 0x5e6546
mov dword [ebp - 0xbc], esi
mov edi, edi
mov esi, ecx
mov ecx, dword [ebp - 0xa0]
add ecx, 0xffffffec
cmp ecx, 5
ja case.default.0x5e63f4
jmp dword [ecx*4 + 0x5e675c]
test edi, edi
je case.default.0x5e63f4
mov edx, dword [ebp - 0xa8]
mov esi, edi
inc edx
lea esp, [esp]
movzx ecx, byte [edx + 1]
lea edx, [edx + 3]
mov byte [eax], cl
movzx ecx, byte [edx - 3]
mov byte [eax + 1], cl
movzx ecx, byte [edx - 4]
mov byte [eax + 2], cl
add eax, 3
dec esi
jne 0x5e6410
jmp case.default.0x5e63f4
test edi, edi
je case.default.0x5e63f4
mov edx, dword [ebp - 0xa8]
mov esi, edi
inc edx
movzx ecx, byte [edx + 1]
lea edx, [edx + 4]
mov byte [eax], cl
movzx ecx, byte [edx - 4]
mov byte [eax + 1], cl
movzx ecx, byte [edx - 5]
mov byte [eax + 2], cl
add eax, 3
dec esi
jne 0x5e6443
jmp case.default.0x5e63f4
test edi, edi
je case.default.0x5e63f4
lea ecx, [ecx]
mov ecx, dword [esi]
lea esi, [esi + 2]
mov edx, ecx
mov ebx, ecx
and cl, 0x1f
shr edx, 0xb
mov dword [ebp - 0xb0], ecx
and dl, 0x1f
mov cl, dl
shr ebx, 5
shr cl, 2
and bl, 0x3f
shl dl, 3
or cl, dl
mov edx, dword [ebp - 0xb0]
mov byte [eax], cl
mov cl, bl
shr cl, 2
shl bl, 2
or cl, bl
mov byte [eax + 1], cl
mov cl, dl
shr cl, 2
shl dl, 3
or cl, dl
mov byte [eax + 2], cl
add eax, 3
dec edi
jne 0x5e6470
jmp 0x5e6516
test edi, edi
je case.default.0x5e63f4
mov ecx, dword [esi]
lea esi, [esi + 2]
mov edx, ecx
mov ebx, ecx
and cl, 0x1f
shr edx, 0xa
mov dword [ebp - 0xb0], ecx
and dl, 0x1f
mov cl, dl
shr ebx, 5
shr cl, 2
and bl, 0x1f
shl dl, 3
or cl, dl
mov edx, dword [ebp - 0xb0]
mov byte [eax], cl
mov cl, bl
shr cl, 2
shl bl, 3
or cl, bl
mov byte [eax + 1], cl
mov cl, dl
shr cl, 2
shl dl, 3
or cl, dl
mov byte [eax + 2], cl
add eax, 3
dec edi
jne 0x5e64c6
mov edi, dword [ebp - 0xc0]
mov ecx, dword [ebp - 0xa8]
add ecx, dword [ebp - 0xcc]
dec dword [ebp - 0xbc]
mov dword [ebp - 0xa8], ecx
jne 0x5e63e0
mov esi, dword [ebp - 0xb4]
mov ebx, dword [ebp - 0xac]
mov ecx, dword [ebp - 0xa4]
test ecx, ecx
je 0x5e656c
mov eax, dword [ecx]
push ecx
call dword [eax + 0x28]
mov eax, dword [ebp - 0xa4]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov dword [ebp - 0xa4], 0
mov ecx, dword [ebp - 0xb8]
push esi
push edi
push dword [ebp - 0xc4]
push ebx
call fcn.005e6200
push dword [ebp - 0xc4]
mov bl, al
call fcn.005d0680
add esp, 4
test bl, bl
jne 0x5e65be
push esi
push edi
push dword [ebp - 0xac]
push str.Failed_to_save_JPEG_file.___s___d___d_
call fcn.005aaeb0
add esp, 0x10
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0065b5b4
mov esp, ebp
pop ebp
ret 4
cmp byte [0x814b08], 0
je 0x5e6734
push 0x6bff14
push dword [ebp - 0xac]
call fcn.0065bf95
mov edi, eax
add esp, 8
test edi, edi
je 0x5e6734
push 2
push 0
push edi
call fcn.0065f2a7
push edi
call fcn.0065f6ba
push 0
push 0
push edi
mov esi, eax
call fcn.0065f2a7
add esi, 0xffffffeb
push esi
mov dword [ebp - 0xb4], esi
call fcn.006601ab
push edi
push 1
mov ebx, eax
lea eax, [ebp - 0x40]
push 0x15
push eax
call fcn.0065c270
push edi
push 1
push esi
push ebx
call fcn.0065c270
add esp, 0x40
push edi
call fcn.0065bb1c
add esp, 4
lea eax, [ebp - 0x80]
push 0x40
push eax
push esi
push ebx
call fcn.005afc00
mov esi, dword [ebp - 0xac]
add esp, 8
push eax
push esi
call fcn.005e57b0
lea ecx, [ebp - 0x80]
add esp, 0x10
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x5e6660
sub ecx, edx
mov word [ebp - 0x28], 0xe1
push 0x6dea08
push esi
mov dword [ebp - 0x25], 0x66697845
lea eax, [ecx + 1]
mov dword [ebp - 0x21], 0x49490000
mov dword [ebp - 0xb8], eax
mov byte [ebp - 0x11], al
add al, 0x23
mov dword [ebp - 0x1d], 0x8002a
mov dword [ebp - 0x19], 0x10000
mov dword [ebp - 0x15], 0x2010e
mov dword [ebp - 0x10], 0x1a000000
mov dword [ebp - 0xc], 0
mov word [ebp - 8], 0
mov byte [ebp - 6], 0
mov byte [ebp - 0x26], al
call fcn.0065bf95
mov esi, eax
add esp, 8
test esi, esi
je 0x5e672b
push esi
push 1
lea eax, [ebp - 0x40]
push 0x15
push eax
call fcn.0065c5e5
push esi
push 1
lea eax, [ebp - 0x28]
push 0x23
push eax
call fcn.0065c5e5
push esi
push 1
push dword [ebp - 0xb8]
lea eax, [ebp - 0x80]
push eax
call fcn.0065c5e5
push esi
push 0
call fcn.0065bfaa
push esi
push 0xff
call fcn.0065bfaa
add esp, 0x40
push esi
push 1
push dword [ebp - 0xb4]
push ebx
call fcn.0065c5e5
push esi
call fcn.0065bb1c
add esp, 0x14
push ebx
call fcn.0065cb97
add esp, 4
mov ecx, dword [ebp - 4]
mov al, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0065b5b4
mov esp, ebp
pop ebp
ret 4