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

Disassembly:
sub esp, 0xcec
mov eax, dword [0x425028]
xor eax, esp
mov dword [esp + 0xce8], eax
push ebx
push ebp
push esi
mov ebp, dword [esp + 0xcfc]
push edi
mov ebx, ecx
mov ecx, 8
mov esi, str.zbsharewarecrypt
lea edi, [esp + 0x94]
rep movsd dword es:[edi], dword [esi]
mov eax, 1
movsw word es:[edi], word [esi]
push 0x42
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
xor esi, esi
lea eax, [esp + 0xba]
push esi
push eax
mov dword [esp + 0x24], ebx
call sub.MSVCR80.dll_memset
xor eax, eax
push 0x62
lea ecx, [esp + 0x42]
push esi
push ecx
mov word [esp + 0x34], 0xd
mov word [esp + 0x36], 0xa
mov word [esp + 0x38], si
mov dword [esp + 0x3a], eax
mov dword [esp + 0x3e], eax
mov dword [esp + 0x42], eax
mov word [esp + 0x46], ax
mov word [esp + 0x48], si
call sub.MSVCR80.dll_memset
add esp, 0x18
cmp byte [esp + 0xd04], 0
je 0x407585
push 0x3ff
lea edx, [esp + 0xfd]
push esi
push edx
mov byte [esp + 0x104], 0
call sub.MSVCR80.dll_memset
push 0x7fe
lea eax, [esp + 0x50a]
push esi
push eax
mov word [esp + 0x510], si
call sub.MSVCR80.dll_memset
add esp, 0x18
cmp ebx, esi
je 0x407769
cmp ebp, esi
je 0x407769
push esi
push esi
push 3
push esi
push esi
mov esi, dword [sym.imp.kernel32.dll_CreateFileW]
push 0x80000000
push ebx
call esi
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x18], edi
jne 0x4073ab
push eax
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, 3
jmp 0x40776e
lea eax, [esp + 0x94]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4073b5
sub eax, edx
push 0
sar eax, 1
lea ecx, [esp + 0x14]
push ecx
lea edx, [eax + eax]
push edx
lea eax, [esp + 0x3c]
push eax
push edi
call dword [sym.imp.kernel32.dll_ReadFile]
test eax, eax
je 0x407430
lea ecx, [esp + 0x94]
lea eax, [esp + 0x30]
lea ebx, [ebx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x407416
test dx, dx
je 0x407412
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x407416
add eax, 4
add ecx, 4
test dx, dx
jne 0x4073f0
xor eax, eax
jmp 0x40741b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x407430
push edi
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, 5
jmp 0x40776e
push 0
push 0
push 0
push edi
call dword [sym.imp.kernel32.dll_SetFilePointer]
push 0
push 0
push 2
push 0
push 0
push 0xc0000000
push ebp
call esi
mov esi, eax
cmp esi, 0xffffffff
je 0x40756e
lea eax, [esp + 0x94]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x407464
mov edi, dword [sym.imp.kernel32.dll_WriteFile]
sub eax, edx
push 0
sar eax, 1
lea ecx, [esp + 0x18]
push ecx
lea edx, [eax + eax]
push edx
lea eax, [esp + 0xa0]
push eax
push esi
call edi
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x407494
sub eax, edx
push 0
sar eax, 1
lea ecx, [esp + 0x18]
push ecx
lea edx, [eax + eax]
push edx
push ebx
push esi
call edi
lea eax, [esp + 0x1c]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4074c0
sub eax, edx
push 0
sar eax, 1
lea ecx, [esp + 0x18]
push ecx
lea edx, [eax + eax]
push edx
lea eax, [esp + 0x28]
push eax
push esi
call edi
mov dword [esp + 0x10], 1
lea ebx, [ebx]
mov ebx, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x14]
push ecx
push 0x3e8
lea edx, [esp + 0x104]
push edx
push ebx
call dword [sym.imp.kernel32.dll_ReadFile]
mov ecx, dword [esp + 0x10]
test ecx, ecx
jbe 0x407558
xor eax, eax
test ecx, ecx
jbe 0x40753c
lea ecx, [ecx]
movzx dx, byte [esp + eax + 0xf8]
add dx, 0xc
mov word [esp + eax*2 + 0x4f8], dx
add eax, 1
cmp eax, ecx
jb 0x407520
push 0
lea eax, [esp + 0x18]
push eax
add ecx, ecx
push ecx
lea edx, [esp + 0x504]
push edx
push esi
call edi
cmp dword [esp + 0x10], 0
ja 0x4074f0
mov edi, dword [sym.imp.kernel32.dll_CloseHandle]
push ebx
call edi
push esi
call edi
mov eax, 1
jmp 0x40776e
mov esi, dword [sym.imp.kernel32.dll_CloseHandle]
push 0xffffffffffffffff
call esi
push edi
call esi
mov eax, 4
jmp 0x40776e
push 0x7fe
lea eax, [esp + 0x4fe]
push esi
push eax
mov word [esp + 0x504], si
call sub.MSVCR80.dll_memset
push 0x3ff
lea ecx, [esp + 0x109]
push esi
push ecx
mov byte [esp + 0x110], 0
call sub.MSVCR80.dll_memset
add esp, 0x18
cmp ebx, esi
je 0x407769
cmp ebp, esi
je 0x407769
push esi
push esi
push 3
push esi
push esi
mov esi, dword [sym.imp.kernel32.dll_CreateFileW]
push 0x80000000
push ebp
call esi
mov edi, eax
cmp edi, 0xffffffff
jne 0x4075fa
push eax
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, 4
jmp 0x40776e
lea eax, [esp + 0x94]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x407604
mov ebx, dword [sym.imp.kernel32.dll_ReadFile]
sub eax, edx
push 0
sar eax, 1
lea edx, [esp + 0x14]
push edx
add eax, eax
push eax
lea ecx, [esp + 0x3c]
push ecx
push edi
call ebx
test eax, eax
je 0x40766f
lea edx, [esp + 0x94]
lea ecx, [esp + 0x30]
lea ebx, [ebx]
mov ax, word [ecx]
cmp ax, word [edx]
jne 0x407666
test ax, ax
je 0x407662
mov ax, word [ecx + 2]
cmp ax, word [edx + 2]
jne 0x407666
add ecx, 4
add edx, 4
test ax, ax
jne 0x407640
xor eax, eax
jmp 0x40766b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x407680
push edi
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, 6
jmp 0x40776e
mov dword [esp + 0x10], 2
mov word [esp + 0x30], 0
nop
cmp word [esp + 0x30], 0xa
je 0x4076b0
push 0
lea edx, [esp + 0x14]
push edx
push 2
lea eax, [esp + 0x3c]
push eax
push edi
call ebx
cmp dword [esp + 0x10], 0
ja 0x407690
mov ecx, dword [esp + 0x18]
push 0
push 0
push 1
push 0
push 0
push 0xc0000000
push ecx
call esi
mov esi, eax
cmp esi, 0xffffffff
je 0x407755
cmp dword [esp + 0x10], 0
jbe 0x407742
mov ebp, dword [sym.imp.kernel32.dll_WriteFile]
mov edi, edi
push 0
lea edx, [esp + 0x14]
push edx
push 0x7d0
lea eax, [esp + 0x504]
push eax
push edi
call ebx
mov eax, dword [esp + 0x10]
shr eax, 1
test eax, eax
jle 0x40773b
xor ecx, ecx
test eax, eax
jle 0x407728
jmp 0x407710
mov dl, byte [esp + ecx*2 + 0x4f8]
sub dl, 0xc
mov byte [esp + ecx + 0xf8], dl
add ecx, 1
cmp ecx, eax
jl 0x407710
push 0
lea ecx, [esp + 0x18]
push ecx
push eax
lea edx, [esp + 0x104]
push edx
push esi
call ebp
cmp dword [esp + 0x10], 0
ja 0x4076e0
push esi
mov esi, dword [sym.imp.kernel32.dll_CloseHandle]
call esi
push edi
call esi
mov eax, 1
jmp 0x40776e
mov esi, dword [sym.imp.kernel32.dll_CloseHandle]
push 0xffffffffffffffff
call esi
push edi
call esi
mov eax, 3
jmp 0x40776e
mov eax, 2
mov ecx, dword [esp + 0xcf8]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00417909
add esp, 0xcec
ret 8