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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
mov eax, dword [0x7b7fc0]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x10c], ecx
lea eax, [ebp - 0xa8]
push eax
push 0
push 0
mov ecx, dword [0x7d3adc]
mov edx, dword [ecx]
mov eax, dword [0x7d3adc]
push eax
mov ecx, dword [edx + 0x40]
call ecx
mov dword [ebp - 0xb8], eax
cmp dword [ebp - 0xb8], 0
jge 0x5bf9e1
mov edx, dword [ebp - 0xb8]
push edx
push str.Failed_to_get_back_buffer__0x_08x_
call fcn.00567380
add esp, 8
xor al, al
jmp 0x5c0345
lea eax, [ebp - 0xa0]
push eax
mov ecx, dword [ebp - 0xa8]
mov edx, dword [ecx]
mov eax, dword [ebp - 0xa8]
push eax
mov ecx, dword [edx + 0x20]
call ecx
mov dword [ebp - 0xb8], eax
cmp dword [ebp - 0xb8], 0
jge 0x5bfa4d
mov edx, dword [ebp - 0xb8]
push edx
push str.Failed_to_get_surface_desc__0x_08x_
call fcn.00567380
add esp, 8
cmp dword [ebp - 0xa8], 0
je 0x5bfa46
mov eax, dword [ebp - 0xa8]
mov ecx, dword [eax]
mov edx, dword [ebp - 0xa8]
push edx
mov eax, dword [ecx + 8]
call eax
mov dword [ebp - 0xa8], 0
xor al, al
jmp 0x5c0345
mov ecx, dword [ebp - 0x88]
mov dword [ebp - 0xc4], ecx
mov edx, dword [ebp - 0x84]
mov dword [ebp - 0xd8], edx
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0xd0], eax
mov ecx, dword [ebp - 0xd0]
sub ecx, 0x1a
mov dword [ebp - 0xd0], ecx
cmp dword [ebp - 0xd0], 5
ja case.0x5bfa8f.2
mov edx, dword [ebp - 0xd0]
jmp dword [edx*4 + 0x5c0358]
mov eax, dword [ebp - 0xa0]
push eax
push str.Unsupported_BackBuffer_Format__d_._Please_contact_Metin_2_Administrator.
call fcn.00567380
add esp, 8
cmp dword [ebp - 0xa8], 0
je 0x5bfad3
mov ecx, dword [ebp - 0xa8]
mov edx, dword [ecx]
mov eax, dword [ebp - 0xa8]
push eax
mov ecx, dword [edx + 8]
call ecx
mov dword [ebp - 0xa8], 0
xor al, al
jmp 0x5c0345
push 0x8810
push 0
lea edx, [ebp - 0x11c]
push edx
mov eax, dword [ebp - 0xa8]
mov ecx, dword [eax]
mov edx, dword [ebp - 0xa8]
push edx
mov eax, dword [ecx + 0x24]
call eax
mov dword [ebp - 0xb8], eax
cmp dword [ebp - 0xb8], 0
jge 0x5bfb4d
mov ecx, dword [ebp - 0xb8]
push ecx
push str.Failed_to_lock_the_surface__0x_08x_
call fcn.00567380
add esp, 8
cmp dword [ebp - 0xa8], 0
je 0x5bfb46
mov edx, dword [ebp - 0xa8]
mov eax, dword [edx]
mov ecx, dword [ebp - 0xa8]
push ecx
mov edx, dword [eax + 8]
call edx
mov dword [ebp - 0xa8], 0
xor al, al
jmp 0x5c0345
mov eax, dword [ebp - 0xc4]
imul eax, dword [ebp - 0xd8]
imul ecx, eax, 3
push ecx
call fcn.0065d695
add esp, 4
mov dword [ebp - 0x108], eax
mov edx, dword [ebp - 0x108]
mov dword [ebp - 0xcc], edx
cmp dword [ebp - 0xcc], 0
jne 0x5bfbc7
mov eax, dword [ebp - 0xa8]
mov ecx, dword [eax]
mov edx, dword [ebp - 0xa8]
push edx
mov eax, dword [ecx + 0x28]
call eax
mov ecx, dword [ebp - 0xa8]
mov edx, dword [ecx]
mov eax, dword [ebp - 0xa8]
push eax
mov ecx, dword [edx + 8]
call ecx
mov dword [ebp - 0xa8], 0
push str.Failed_to_allocate_screenshot_buffer
call fcn.00567380
add esp, 4
xor al, al
jmp 0x5c0345
mov edx, dword [ebp - 0x118]
mov dword [ebp - 0x100], edx
mov eax, dword [ebp - 0xcc]
mov dword [ebp - 0xa4], eax
mov dword [ebp - 0xe4], 0
jmp 0x5bfbfa
mov ecx, dword [ebp - 0xe4]
add ecx, 1
mov dword [ebp - 0xe4], ecx
mov edx, dword [ebp - 0xe4]
cmp edx, dword [ebp - 0xd8]
jae 0x5bfff5
mov eax, dword [ebp - 0x100]
mov dword [ebp - 0xac], eax
mov ecx, dword [ebp - 0xa0]
mov dword [ebp - 0xdc], ecx
mov edx, dword [ebp - 0xdc]
sub edx, 0x14
mov dword [ebp - 0xdc], edx
cmp dword [ebp - 0xdc], 5
ja case.default.0x5bfc46
mov eax, dword [ebp - 0xdc]
jmp dword [eax*4 + 0x5c0370]
mov dword [ebp - 0xe8], 0
jmp 0x5bfc68
mov ecx, dword [ebp - 0xe8]
add ecx, 1
mov dword [ebp - 0xe8], ecx
mov edx, dword [ebp - 0xe8]
cmp edx, dword [ebp - 0xc4]
jae 0x5bfd05
mov eax, 1
shl eax, 1
mov ecx, dword [ebp - 0xa4]
mov edx, dword [ebp - 0xac]
mov al, byte [edx + eax]
mov byte [ecx], al
mov ecx, dword [ebp - 0xa4]
add ecx, 1
mov dword [ebp - 0xa4], ecx
mov edx, 1
shl edx, 0
mov eax, dword [ebp - 0xa4]
mov ecx, dword [ebp - 0xac]
mov dl, byte [ecx + edx]
mov byte [eax], dl
mov eax, dword [ebp - 0xa4]
add eax, 1
mov dword [ebp - 0xa4], eax
mov ecx, 1
imul edx, ecx, 0
mov eax, dword [ebp - 0xa4]
mov ecx, dword [ebp - 0xac]
mov dl, byte [ecx + edx]
mov byte [eax], dl
mov eax, dword [ebp - 0xa4]
add eax, 1
mov dword [ebp - 0xa4], eax
mov ecx, dword [ebp - 0xac]
add ecx, 3
mov dword [ebp - 0xac], ecx
jmp 0x5bfc59
jmp case.default.0x5bfc46
mov dword [ebp - 0xec], 0
jmp 0x5bfd25
mov edx, dword [ebp - 0xec]
add edx, 1
mov dword [ebp - 0xec], edx
mov eax, dword [ebp - 0xec]
cmp eax, dword [ebp - 0xc4]
jae 0x5bfdc2
mov ecx, 1
shl ecx, 1
mov edx, dword [ebp - 0xa4]
mov eax, dword [ebp - 0xac]
mov cl, byte [eax + ecx]
mov byte [edx], cl
mov edx, dword [ebp - 0xa4]
add edx, 1
mov dword [ebp - 0xa4], edx
mov eax, 1
shl eax, 0
mov ecx, dword [ebp - 0xa4]
mov edx, dword [ebp - 0xac]
mov al, byte [edx + eax]
mov byte [ecx], al
mov ecx, dword [ebp - 0xa4]
add ecx, 1
mov dword [ebp - 0xa4], ecx
mov edx, 1
imul eax, edx, 0
mov ecx, dword [ebp - 0xa4]
mov edx, dword [ebp - 0xac]
mov al, byte [edx + eax]
mov byte [ecx], al
mov ecx, dword [ebp - 0xa4]
add ecx, 1
mov dword [ebp - 0xa4], ecx
mov edx, dword [ebp - 0xac]
add edx, 4
mov dword [ebp - 0xac], edx
jmp 0x5bfd16
jmp case.default.0x5bfc46
mov dword [ebp - 0xf0], 0
jmp 0x5bfde2
mov eax, dword [ebp - 0xf0]
add eax, 1
mov dword [ebp - 0xf0], eax
mov ecx, dword [ebp - 0xf0]
cmp ecx, dword [ebp - 0xc4]
jae 0x5bfed0
mov edx, dword [ebp - 0xac]
mov eax, dword [edx]
mov dword [ebp - 0xf4], eax
mov ecx, dword [ebp - 0xf4]
shr ecx, 0xb
and ecx, 0x1f
mov byte [ebp - 0xb2], cl
mov edx, dword [ebp - 0xf4]
shr edx, 5
and edx, 0x3f
mov byte [ebp - 0xad], dl
mov eax, dword [ebp - 0xf4]
and eax, 0x1f
mov byte [ebp - 0xae], al
movzx ecx, byte [ebp - 0xb2]
shl ecx, 3
movzx edx, byte [ebp - 0xb2]
sar edx, 2
or ecx, edx
mov eax, dword [ebp - 0xa4]
mov byte [eax], cl
mov ecx, dword [ebp - 0xa4]
add ecx, 1
mov dword [ebp - 0xa4], ecx
movzx edx, byte [ebp - 0xad]
shl edx, 2
movzx eax, byte [ebp - 0xad]
sar eax, 2
or edx, eax
mov ecx, dword [ebp - 0xa4]
mov byte [ecx], dl
mov edx, dword [ebp - 0xa4]
add edx, 1
mov dword [ebp - 0xa4], edx
movzx eax, byte [ebp - 0xae]
shl eax, 3
movzx ecx, byte [ebp - 0xae]
sar ecx, 2
or eax, ecx
mov edx, dword [ebp - 0xa4]
mov byte [edx], al
mov eax, dword [ebp - 0xa4]
add eax, 1
mov dword [ebp - 0xa4], eax
mov ecx, dword [ebp - 0xac]
add ecx, 2
mov dword [ebp - 0xac], ecx
jmp 0x5bfdd3
jmp case.default.0x5bfc46
mov dword [ebp - 0xf8], 0
jmp 0x5bfef0
mov edx, dword [ebp - 0xf8]
add edx, 1
mov dword [ebp - 0xf8], edx
mov eax, dword [ebp - 0xf8]
cmp eax, dword [ebp - 0xc4]
jae case.default.0x5bfc46
mov ecx, dword [ebp - 0xac]
mov edx, dword [ecx]
mov dword [ebp - 0xfc], edx
mov eax, dword [ebp - 0xfc]
shr eax, 0xa
and eax, 0x1f
mov byte [ebp - 0xaf], al
mov ecx, dword [ebp - 0xfc]
shr ecx, 5
and ecx, 0x1f
mov byte [ebp - 0xb0], cl
mov edx, dword [ebp - 0xfc]
and edx, 0x1f
mov byte [ebp - 0xb1], dl
movzx eax, byte [ebp - 0xaf]
shl eax, 3
movzx ecx, byte [ebp - 0xaf]
sar ecx, 2
or eax, ecx
mov edx, dword [ebp - 0xa4]
mov byte [edx], al
mov eax, dword [ebp - 0xa4]
add eax, 1
mov dword [ebp - 0xa4], eax
movzx ecx, byte [ebp - 0xb0]
shl ecx, 3
movzx edx, byte [ebp - 0xb0]
sar edx, 2
or ecx, edx
mov eax, dword [ebp - 0xa4]
mov byte [eax], cl
mov ecx, dword [ebp - 0xa4]
add ecx, 1
mov dword [ebp - 0xa4], ecx
movzx edx, byte [ebp - 0xb1]
shl edx, 3
movzx eax, byte [ebp - 0xb1]
sar eax, 2
or edx, eax
mov ecx, dword [ebp - 0xa4]
mov byte [ecx], dl
mov edx, dword [ebp - 0xa4]
add edx, 1
mov dword [ebp - 0xa4], edx
mov eax, dword [ebp - 0xac]
add eax, 2
mov dword [ebp - 0xac], eax
jmp 0x5bfee1
mov ecx, dword [ebp - 0x100]
add ecx, dword [ebp - 0x11c]
mov dword [ebp - 0x100], ecx
jmp 0x5bfbeb
cmp dword [ebp - 0xa8], 0
je 0x5c0030
mov edx, dword [ebp - 0xa8]
mov eax, dword [edx]
mov ecx, dword [ebp - 0xa8]
push ecx
mov edx, dword [eax + 0x28]
call edx
mov eax, dword [ebp - 0xa8]
mov ecx, dword [eax]
mov edx, dword [ebp - 0xa8]
push edx
mov eax, dword [ecx + 8]
call eax
mov dword [ebp - 0xa8], 0
mov ecx, dword [ebp - 0xd8]
push ecx
mov edx, dword [ebp - 0xc4]
push edx
mov eax, dword [ebp - 0xcc]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x10c]
call fcn.005bf930
mov byte [ebp - 0xbd], al
cmp dword [ebp - 0xcc], 0
je 0x5c0088
mov edx, dword [ebp - 0xcc]
mov dword [ebp - 0x110], edx
mov eax, dword [ebp - 0x110]
push eax
call fcn.0065d69e
add esp, 4
mov dword [ebp - 0xcc], 0
movzx ecx, byte [ebp - 0xbd]
test ecx, ecx
jne 0x5c00b9
mov edx, dword [ebp - 0xd8]
push edx
mov eax, dword [ebp - 0xc4]
push eax
mov ecx, dword [ebp + 8]
push ecx
push str.Failed_to_save_JPEG_file.___s___d___d_
call fcn.00567380
add esp, 0x10
xor al, al
jmp 0x5c0345
movzx edx, byte [0x80b6c4]
test edx, edx
je 0x5c0343
push 0x73d3e4
mov eax, dword [ebp + 8]
push eax
call fcn.006822aa
add esp, 8
mov dword [ebp - 0xc8], eax
cmp dword [ebp - 0xc8], 0
je 0x5c0343
push 2
push 0
mov ecx, dword [ebp - 0xc8]
push ecx
call fcn.00682b3b
add esp, 0xc
mov edx, dword [ebp - 0xc8]
push edx
call fcn.006831d9
add esp, 4
mov dword [ebp - 0x114], eax
push 0
push 0
mov eax, dword [ebp - 0xc8]
push eax
call fcn.00682b3b
add esp, 0xc
mov ecx, dword [ebp - 0x114]
sub ecx, 0x15
mov dword [ebp - 0xd4], ecx
mov edx, dword [ebp - 0xd4]
push edx
call fcn.0068cac5
add esp, 4
mov dword [ebp - 0xe0], eax
mov eax, dword [ebp - 0xc8]
push eax
push 1
push 0x15
lea ecx, [ebp - 0x40]
push ecx
call fcn.00682729
add esp, 0x10
mov edx, dword [ebp - 0xc8]
push edx
push 1
mov eax, dword [ebp - 0xd4]
push eax
mov ecx, dword [ebp - 0xe0]
push ecx
call fcn.00682729
add esp, 0x10
mov edx, dword [ebp - 0xc8]
push edx
call fcn.00682164
add esp, 4
push 0x40
lea eax, [ebp - 0x80]
push eax
mov ecx, dword [ebp - 0xd4]
push ecx
mov edx, dword [ebp - 0xe0]
push edx
call fcn.00568540
add esp, 8
push eax
mov eax, dword [ebp + 8]
push eax
call fcn.005beed0
add esp, 0x10
lea ecx, [ebp - 0x80]
push ecx
call fcn.00681de0
add esp, 4
add eax, 1
mov dword [ebp - 0x104], eax
mov byte [ebp - 0x28], 0xe1
mov byte [ebp - 0x27], 0
mov byte [ebp - 0x26], 0
mov byte [ebp - 0x25], 0x45
mov byte [ebp - 0x24], 0x78
mov byte [ebp - 0x23], 0x69
mov byte [ebp - 0x22], 0x66
mov byte [ebp - 0x21], 0
mov byte [ebp - 0x20], 0
mov byte [ebp - 0x1f], 0x49
mov byte [ebp - 0x1e], 0x49
mov byte [ebp - 0x1d], 0x2a
mov byte [ebp - 0x1c], 0
mov byte [ebp - 0x1b], 8
mov byte [ebp - 0x1a], 0
mov byte [ebp - 0x19], 0
mov byte [ebp - 0x18], 0
mov byte [ebp - 0x17], 1
mov byte [ebp - 0x16], 0
mov byte [ebp - 0x15], 0xe
mov byte [ebp - 0x14], 1
mov byte [ebp - 0x13], 2
mov byte [ebp - 0x12], 0
mov dl, byte [ebp - 0x104]
mov byte [ebp - 0x11], dl
mov byte [ebp - 0x10], 0
mov byte [ebp - 0xf], 0
mov byte [ebp - 0xe], 0
mov byte [ebp - 0xd], 0x1a
mov byte [ebp - 0xc], 0
mov byte [ebp - 0xb], 0
mov byte [ebp - 0xa], 0
mov byte [ebp - 9], 0
mov byte [ebp - 8], 0
mov byte [ebp - 7], 0
mov byte [ebp - 6], 0
mov eax, dword [ebp - 0x104]
add eax, 0x23
mov ecx, 1
shl ecx, 1
mov byte [ebp + ecx - 0x28], al
push 0x73f868
mov edx, dword [ebp + 8]
push edx
call fcn.006822aa
add esp, 8
mov dword [ebp - 0xbc], eax
cmp dword [ebp - 0xbc], 0
je 0x5c0334
mov eax, dword [ebp - 0xbc]
push eax
push 1
push 0x15
lea ecx, [ebp - 0x40]
push ecx
call fcn.006824e0
add esp, 0x10
mov edx, dword [ebp - 0xbc]
push edx
push 1
push 0x23
lea eax, [ebp - 0x28]
push eax
call fcn.006824e0
add esp, 0x10
mov ecx, dword [ebp - 0xbc]
push ecx
push 1
mov edx, dword [ebp - 0x104]
push edx
lea eax, [ebp - 0x80]
push eax
call fcn.006824e0
add esp, 0x10
mov ecx, dword [ebp - 0xbc]
push ecx
push 0
call fcn.00690ae8
add esp, 8
mov edx, dword [ebp - 0xbc]
push edx
push 0xff
call fcn.00690ae8
add esp, 8
mov eax, dword [ebp - 0xbc]
push eax
push 1
mov ecx, dword [ebp - 0xd4]
push ecx
mov edx, dword [ebp - 0xe0]
push edx
call fcn.006824e0
add esp, 0x10
mov eax, dword [ebp - 0xbc]
push eax
call fcn.00682164
add esp, 4
mov ecx, dword [ebp - 0xe0]
push ecx
call fcn.0068c018
add esp, 4
mov al, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0065d40e
mov esp, ebp
pop ebp
ret 4