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

Disassembly:
sub esp, 0x14
push ebx
push ebp
push esi
push edi
mov ebp, 1
push str._jdx_c_s
mov dword [0x4226f4], ebp
mov byte [0x4221a8], 0
call fcn.00406890
add esp, 4
mov ebx, eax
xor eax, eax
lea ebx, [ebx]
mov cl, byte [eax + 0x4223a0]
mov byte [eax + 0x422530], cl
add eax, ebp
test cl, cl
jne 0x406ca0
mov eax, ebx
mov ecx, ebx
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x406cb6
mov edi, 0x422530
sub eax, ecx
mov esi, ecx
add edi, 0xffffffff
jmp 0x406cd0
mov cl, byte [edi + 1]
add edi, ebp
test cl, cl
jne 0x406cd0
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push 0x41aed0
push 0x422530
rep movsb byte es:[edi], byte [esi]
call fcn.004082c3
push ebx
mov esi, eax
call fcn.004094ae
add esp, 0xc
test esi, esi
jne 0x406d15
pop edi
pop esi
mov dword [0x423518], ebp
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret
push esi
push ebp
lea eax, [esp + 0x18]
push 4
push eax
call fcn.00409a21
add esp, 0x10
cmp eax, ebp
je 0x406d47
push esi
call fcn.004088b2
add esp, 4
pop edi
pop esi
pop ebp
mov dword [0x423518], 2
xor eax, eax
pop ebx
add esp, 0x14
ret
mov ecx, dword [esp + 0x10]
push ecx
call fcn.004093c9
mov edi, eax
add esp, 4
test edi, edi
mov dword [esp + 0x14], edi
push esi
jne 0x406d7b
call fcn.004088b2
add esp, 4
pop edi
pop esi
pop ebp
mov dword [0x423518], 3
xor eax, eax
pop ebx
add esp, 0x14
ret
mov edx, dword [esp + 0x14]
push ebp
push edx
push edi
call fcn.00409a21
add esp, 0x10
cmp eax, ebp
jne 0x407316
cmp dword [esp + 0x10], 0x88
jne 0x407316
push esi
call fcn.004088b2
push 0x88
call fcn.004093c9
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x406ddc
push edi
call fcn.004094ae
push esi
call fcn.004088b2
add esp, 8
pop edi
pop esi
pop ebp
mov dword [0x423518], 5
xor eax, eax
pop ebx
add esp, 0x14
ret
xor esi, esi
cmp dword [esp + 0x10], esi
jle 0x406e27
mov ebx, edi
sub ebx, ebp
jmp 0x406df0
mov eax, 0x2aaaaaab
imul esi
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*2]
shl eax, 4
mov ecx, esi
sub ecx, eax
push ecx
lea edi, [esi + ebp]
call fcn.004068e0
mov dl, byte [ebx + edi]
sub dl, al
add esi, 1
add esp, 4
mov byte [edi], dl
cmp esi, dword [esp + 0x10]
jl 0x406df0
mov eax, dword [esp + 0x14]
push eax
mov dword [0x423514], ebp
call fcn.004094ae
push esi
call fcn.00406c60
mov ebx, dword [0x423514]
add esp, 8
cmp byte [ebx + 0x69], 5
je 0x406e5b
mov dword [0x423518], 7
jmp 0x4072e0
cmp byte [ebx + 0x6b], 1
je 0x406e70
mov dword [0x423518], 8
jmp 0x4072e0
mov eax, dword [ebx + 0x70]
cmp eax, 0xffffffff
je 0x406e95
cmp eax, 0x3e8
jl 0x406e86
cmp eax, 0x989680
jle 0x406e95
mov dword [0x423518], 9
jmp 0x4072e0
lea esi, [ebx + 3]
mov eax, esi
xor ebp, ebp
xor ecx, ecx
lea edi, [eax + 1]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x406ea1
sub eax, edi
test eax, eax
jle 0x406ed0
movsx edx, byte [esi + ecx]
imul edx, ecx
mov eax, esi
add ebp, edx
add ecx, 1
lea edi, [eax + 1]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x406ec1
sub eax, edi
cmp ecx, eax
jl 0x406eb0
and ebp, 0x800000ff
movzx eax, byte [ebx + 0x6c]
jns 0x406ee4
dec ebp
or ebp, 0xffffff00
inc ebp
cmp ebp, eax
je 0x406ef7
mov dword [0x423518], 0xa
jmp 0x4072e0
mov eax, esi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x406f00
sub eax, edx
cmp eax, 3
jbe 0x406f68
cmp dword [ebx + 0x70], 0xffffffff
jne 0x406f68
mov dword [0x4226f4], 0
mov dword [0x422714], 1
call fcn.00406c00
mov ecx, dword [0x423514]
push 0x63
add ecx, 3
push ecx
push 0x4221a8
call fcn.004096a0
mov edx, dword [0x423514]
push edx
mov byte [0x42220b], 0
call fcn.004094ae
add esp, 0x10
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x14
ret
cmp dword [ebx + 0x78], 1
jne 0x406f88
lea eax, [esp + 0x14]
push eax
call fcn.00407d69
mov ecx, dword [esp + 0x18]
mov edx, dword [0x423514]
add esp, 4
mov dword [edx + 0x78], ecx
lea eax, [esp + 0x1c]
push eax
call fcn.00407d69
mov eax, dword [0x423514]
mov ecx, dword [eax + 0x78]
add ecx, dword [eax + 0x70]
mov eax, 0xc22e4507
sub ecx, dword [esp + 0x20]
add esp, 4
add ecx, 0xa8c0
imul ecx
add edx, ecx
sar edx, 0x10
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov dword [0x4226f8], ecx
jns 0x406fcf
mov dword [0x4226f8], 0
push str.VDKBNLD
call fcn.00406890
mov edx, dword [0x4226fc]
add esp, 4
push 0
push 0x407660
mov esi, eax
mov eax, dword [0x422088]
push edx
push esi
push eax
call dword [sym.imp.USER32.dll_DialogBoxParamA]
push esi
mov edi, eax
call fcn.004094ae
add esp, 4
test edi, edi
jne 0x407024
mov ecx, dword [0x423514]
push ecx
call fcn.004094ae
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
add esp, 0x14
ret
mov esi, dword [0x423514]
lea eax, [esi + 3]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x407030
sub eax, edx
cmp eax, 2
jbe 0x407057
cmp dword [esi + 0x70], 0xffffffff
jne 0x407057
call fcn.00406c00
mov dword [0x4226f4], 0
jmp 0x407086
mov esi, dword [sym.imp.USER32.dll_LoadCursorA]
push 0x7f02
push 0
call esi
mov edi, dword [sym.imp.USER32.dll_SetCursor]
push eax
call edi
push 0x3e7
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x7f00
push 0
call esi
push eax
call edi
mov ebp, dword [esp + 0x1c]
mov ebx, dword [0x423514]
mov edi, dword [esp + 0x20]
mov eax, dword [ebx + 0x80]
mov esi, ebp
add esi, 0xe10
mov ecx, edi
cdq
adc ecx, 0
cmp edx, ecx
jl 0x4070bf
jg 0x4070b2
cmp eax, esi
jbe 0x4070bf
cmp dword [0x4226f4], 1
je 0x4072e0
mov eax, dword [ebx + 0x78]
add eax, dword [ebx + 0x70]
cdq
cmp edi, edx
jl 0x407134
jg 0x4070d0
cmp ebp, eax
jbe 0x407134
cmp dword [0x4226f4], 1
jne 0x407134
push 0x420870
call fcn.00406890
push str.Rnqqx
mov esi, eax
call fcn.00406890
add esp, 8
push 0x30
mov edi, eax
call dword [sym.imp.USER32.dll_MessageBeep]
mov edx, dword [0x4226fc]
push 0x10
push edi
push esi
push edx
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
call fcn.004094ae
push edi
call fcn.004094ae
mov eax, dword [0x423514]
push eax
call fcn.004094ae
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
add esp, 0x14
ret
lea ecx, [esp + 0x14]
push ecx
call fcn.00407d69
mov edx, dword [0x423514]
mov eax, dword [esp + 0x18]
mov dword [edx + 0x80], eax
mov ecx, dword [0x423514]
push 0x63
add ecx, 3
push ecx
push 0x4221a8
call fcn.004096a0
add esp, 0x10
cmp dword [0x4226f4], 1
mov byte [0x42220b], 0
jne 0x4071b1
mov edx, dword [str.Unregistered_User]
mov eax, dword [0x41aec0]
mov ecx, dword [0x41aec4]
mov dword [0x4221a8], edx
mov edx, dword [0x41aec8]
mov dword [0x4221ac], eax
mov ax, word [0x41aecc]
mov dword [0x4221b0], ecx
mov dword [0x4221b4], edx
mov word [0x4221b8], ax
push str._jdx_c_s
call fcn.00406890
add esp, 4
mov ebp, eax
xor eax, eax
jmp 0x4071d0
mov cl, byte [eax + 0x4223a0]
mov byte [eax + 0x422530], cl
add eax, 1
test cl, cl
jne 0x4071d0
mov eax, ebp
mov ecx, ebp
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x4071e7
mov edi, 0x422530
sub eax, ecx
mov esi, ecx
add edi, 0xffffffff
lea esp, [esp]
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x407200
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push 0x41aeb8
push 0x422530
rep movsb byte es:[edi], byte [esi]
call fcn.004082c3
push ebp
mov ebx, eax
call fcn.004094ae
add esp, 0xc
test ebx, ebx
jne 0x407245
mov dword [0x423518], 0xc
jmp 0x4072da
mov edi, dword [0x423514]
xor esi, esi
cmp dword [esp + 0x10], esi
jle 0x407283
mov eax, 0x2aaaaaab
imul esi
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*2]
shl ecx, 4
mov edx, esi
sub edx, ecx
push edx
call fcn.004068e0
add byte [edi + esi], al
add esi, 1
add esp, 4
cmp esi, dword [esp + 0x10]
jl 0x407253
push ebx
push 1
lea eax, [esp + 0x18]
push 4
push eax
call fcn.00407ebf
add esp, 0x10
cmp eax, 1
push ebx
je 0x4072ac
call fcn.004088b2
mov dword [0x423518], 0xd
jmp 0x4072d7
mov ecx, dword [0x423514]
push 1
push 0x88
push ecx
call fcn.00407ebf
add esp, 0x10
cmp eax, 1
push ebx
je 0x4072f7
call fcn.004088b2
mov dword [0x423518], 0xe
add esp, 4
mov ebx, dword [0x423514]
test ebx, ebx
je 0x40732f
push ebx
call fcn.004094ae
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret
mov dword [0x422714], 1
call fcn.004088b2
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x14
ret
push edi
call fcn.004094ae
push esi
call fcn.004088b2
mov dword [0x423518], 4
add esp, 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret