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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x571c0b
mov eax, dword fs:[0]
push eax
sub esp, 0x1e8
mov eax, dword [0x5d9ff4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x1f4], ecx
push 0xd8
lea eax, [ebp - 0x1ec]
push 0
push eax
call fcn.005516b0
add esp, 0xc
lea ecx, [ebp - 0x1ec]
push 0
push 0x84
call fcn.0041d6c1
mov dword [ebp - method.CPinDlg.virtual_0], vtable.CPinDlg.0
call fcn.0041a104
mov ecx, eax
test ecx, ecx
je 0x4059b0
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x118], eax
lea ecx, [ebp - 0x1ec]
mov dword [ebp - 4], 0
call fcn.00415c90
cmp eax, 1
je 0x405744
mov esi, 1
jmp 0x405936
mov esi, dword [ebp - 0x11c]
lea edx, [ebp - 0x10d]
mov word [ebp - 0x110], 0x501b
mov ecx, 0x1c
mov byte [ebp - 0x10e], 0x53
mov eax, esi
shr eax, cl
and al, 0xf
add al, 0x30
mov byte [edx], al
inc edx
sub ecx, 4
jns 0x405765
mov al, byte [ebp + 8]
mov ecx, 0x1c
movzx esi, word [ebp + 0x18]
mov byte [edx + 1], al
movzx eax, byte [ebp + 0x14]
shl esi, 8
or esi, eax
mov byte [edx], 0x42
movzx eax, byte [ebp + 0x10]
add edx, 2
shl esi, 8
or esi, eax
nop dword [eax]
mov eax, esi
shr eax, cl
and al, 0xf
add al, 0x30
mov byte [edx], al
inc edx
sub ecx, 4
jns 0x4057a0
mov esi, dword [ebp + 0xc]
mov ecx, 0x1c
mov eax, esi
shr eax, cl
and al, 0xf
add al, 0x30
mov byte [edx], al
inc edx
sub ecx, 4
jns 0x4057b8
movzx eax, word [ebp + 0x1c]
mov ecx, 0x1c
imul esi, eax, 0x258
mov eax, esi
shr eax, cl
and al, 0xf
add al, 0x30
mov byte [edx], al
inc edx
sub ecx, 4
jns 0x4057d7
movzx eax, word [ebp + 0x20]
mov ecx, 0x1c
imul esi, eax, 0x258
mov eax, esi
shr eax, cl
and al, 0xf
add al, 0x30
mov byte [edx], al
inc edx
sub ecx, 4
jns 0x4057f6
movzx eax, word [ebp + 0x24]
mov ecx, 0x1c
imul esi, eax, 0x64
mov eax, esi
lea edx, [edx + 1]
shr eax, cl
and al, 0xf
add al, 0x30
sub ecx, 4
mov byte [edx - 1], al
jns 0x405812
lea eax, [ebp - 0x110]
mov byte [edx], 0xa
lea esi, [edx + 1]
sub esi, eax
mov eax, dword [ebp - 0x118]
cmp dword [eax - 4], 1
jle 0x405853
push dword [eax - 0xc]
lea ecx, [ebp - 0x118]
call fcn.00402150
mov eax, dword [ebp - 0x118]
push eax
call fcn.004059c0
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40586a
mov esi, 3
jmp 0x405936
call fcn.0042574f
mov ecx, dword [eax + 4]
call fcn.0041c0a6
push 0
lea eax, [ebp - 0x114]
push eax
push esi
lea eax, [ebp - 0x110]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40591f
push 0
lea eax, [ebp - 0x114]
push eax
push 0x1cc
lea eax, [ebp - 0x110]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40591f
mov edx, dword [ebp - 0x114]
cmp edx, 0xe6
jb 0x405918
lea ecx, [ebp - 0x110]
xor edi, edi
mov esi, ecx
test edx, edx
je 0x40591f
mov al, byte [ecx]
dec edx
inc edi
cmp al, 0xfe
jne 0x4058eb
inc ecx
test edx, edx
je 0x4058f7
dec edx
cmp byte [ecx], 0
setne al
add al, 0xfe
jmp 0x4058ef
cmp esi, ecx
je 0x4058f1
mov byte [esi], al
inc esi
inc ecx
test edx, edx
jne 0x4058d3
cmp edi, 0xe6
jne 0x40591f
mov edi, dword [ebp - 0x1f4]
lea esi, [ebp - 0x110]
mov ecx, 0x39
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor esi, esi
jmp 0x405924
mov esi, 2
jmp 0x405924
mov esi, 3
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x1ed]
call fcn.00404a90
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
mov edx, dword [ebp - 0x118]
mov dword [ebp - method.CPinDlg.virtual_0], vtable.CPinDlg.0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x405965
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x12c]
call fcn.0041b951
lea ecx, [ebp - 0x138]
mov dword [ebp - method.CBrush.virtual_0], vtable.CBrush.0
call fcn.00402400
lea ecx, [ebp - 0x1ec]
call fcn.0041573a
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0054eba5
mov esp, ebp
pop ebp
ret 0x20
push 0x80004005
call fcn.004022d0
int3