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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
xor ebx, ebx
push ebx
push 0x8000080
push 3
push ebx
push 1
push connect
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
jne 0x40528a
call fcn.0041d387
push 0x10
push 0x43cb90
push 0x43cc70
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x405a68
push edi
push 0x1a
call fcn.0042629a
mov edi, eax
cmp edi, ebx
pop ecx
jne 0x4052c3
call fcn.0041d387
push 0x10
push 0x43cb90
push 0x43cb60
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_MessageBoxA]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x405a67
push esi
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
lea eax, [ebp - 8]
push eax
push 0x19
push edi
push dword [ebp - 0x10]
call esi
cmp eax, ebx
je 0x4052e0
cmp dword [ebp - 8], ebx
jne 0x4052e2
mov byte [edi], bl
push str.R_Script_DSF_ver.1.00__r_n
push edi
mov byte [edi + 0x18], bl
mov byte [edi + 0x15], 0x2d
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x405318
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.0041d387
push 0x10
push 0x43cb90
push 0x43cb08
jmp 0x405a5b
push edi
call fcn.004262e0
mov eax, dword [0x44eee0]
xor edi, edi
cmp byte [eax], bl
pop ecx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], edi
je 0x40535b
cmp byte [eax + edi], 0x5c
jne 0x405352
lea ecx, [edi - 1]
push ecx
push eax
call fcn.00424e83
pop ecx
test eax, eax
mov eax, dword [0x44eee0]
pop ecx
jne 0x405352
lea ecx, [eax + edi + 1]
mov dword [ebp - 0x14], ecx
inc edi
cmp byte [eax + edi], bl
jne 0x405330
mov dword [ebp - 0x18], edi
push ebx
lea eax, [ebp - 8]
push eax
push 4
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x10]
call esi
cmp eax, ebx
je 0x405374
cmp dword [ebp - 8], ebx
jne 0x40537b
mov dword [ebp - 0xc], 1
push dword [ebp - 0xc]
call fcn.0042629a
mov edi, eax
cmp edi, ebx
pop ecx
je 0x405a41
push ebx
lea eax, [ebp - 8]
push eax
push dword [ebp - 0xc]
push edi
push dword [ebp - 0x10]
call esi
cmp eax, ebx
je 0x4053a5
cmp dword [ebp - 8], ebx
jne 0x4053a7
mov byte [edi], bl
push dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
push edi
mov byte [eax + edi - 1], bl
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x4053ec
call fcn.0041d387
push 0x24
push edi
push 0x43ca58
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 6
je 0x4053ec
push edi
call fcn.004262e0
pop ecx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x405a64
push edi
call fcn.004262e0
pop ecx
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
inc eax
push ebx
mov dword [ebp - 0xc], eax
lea eax, [ebp - 8]
push eax
push 4
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x10]
call edi
push ebx
lea eax, [ebp - 8]
push eax
push dword [ebp - 0xc]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call edi
cmp dword [0x44eef0], ebx
je 0x405a13
jmp 0x4059f4
cmp dword [ebp - 8], ebx
je 0x405a13
push dword [ebp - 0xc]
mov dword [ebp - 0x24], 2
call fcn.0042629a
cmp eax, ebx
pop ecx
mov dword [ebp - 0x14], eax
je 0x4054f9
push ebx
lea ecx, [ebp - 8]
push ecx
push dword [ebp - 0xc]
push eax
push dword [ebp - 0x10]
call esi
cmp eax, ebx
je 0x405a13
cmp dword [ebp - 8], ebx
je 0x405a13
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x14]
xor edi, edi
cmp dword [0x44eeec], ebx
mov byte [ecx + eax - 1], bl
mov dword [ebp - 0x18], edi
jbe 0x4054d4
mov dword [ebp - 0x20], ebx
push dword [ebp - 0x14]
mov eax, dword [0x44eef0]
mov ecx, dword [ebp - 0x20]
push dword [ecx + eax + 0x24]
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x4054bf
add dword [ebp - 0x20], 0x54
inc edi
cmp edi, dword [0x44eeec]
mov dword [ebp - 0x18], edi
jb 0x405494
jmp 0x4054d4
mov ecx, dword [0x44eef0]
mov eax, edi
imul eax, eax, 0x54
push dword [eax + ecx + 0x24]
call fcn.00405edd
pop ecx
push dword [ebp - 0x14]
call fcn.004262e0
cmp edi, dword [0x44eeec]
pop ecx
mov dword [ebp - 0x14], ebx
jae 0x405508
mov eax, dword [0x44eef0]
imul edi, edi, 0x54
mov eax, dword [edi + eax + 0x24]
mov dword [ebp - 0x14], eax
jmp 0x405508
push 1
push ebx
push dword [ebp - 0xc]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
lea eax, [ebp - 8]
push eax
push 4
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x10]
call esi
cmp eax, ebx
je 0x405a13
cmp dword [ebp - 8], ebx
je 0x405a13
push ebx
lea eax, [ebp - 8]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x10]
call esi
cmp eax, ebx
je 0x405a13
cmp dword [ebp - 8], ebx
je 0x405a13
cmp dword [ebp - 0xc], 1
je 0x405591
mov eax, dword [ebp - 0x18]
cmp eax, dword [0x44eeec]
jae 0x405591
mov ecx, dword [ebp - 0x1c]
mov edi, eax
mov eax, dword [0x44eef0]
imul edi, edi, 0x54
add eax, edi
cmp dword [eax + 4], ecx
jne 0x405594
xor ecx, ecx
mov cl, byte [ebp - 1]
and ecx, 1
push ecx
push dword [eax]
call dword [sym.imp.USER32.dll_EnableWindow]
mov al, byte [ebp - 1]
mov ecx, dword [0x44eef0]
shr al, 1
and al, 1
mov byte [edi + ecx + 0x4d], al
mov ecx, dword [ebp - 0x1c]
cmp ecx, 7
mov edi, dword [ebp - 0x18]
ja 0x405922
je 0x405758
sub ecx, 3
je 0x4056b9
dec ecx
je 0x405654
dec ecx
je 0x4056b9
dec ecx
jne 0x4059f4
push ebx
lea eax, [ebp - 8]
push eax
push 4
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x10]
call esi
cmp eax, ebx
je 0x4059f4
cmp dword [ebp - 8], ebx
je 0x4059f4
push dword [ebp - 0xc]
call fcn.0042629a
mov edi, eax
cmp edi, ebx
pop ecx
je 0x4059a4
push ebx
lea eax, [ebp - 8]
push eax
push dword [ebp - 0xc]
push edi
push dword [ebp - 0x10]
call esi
cmp eax, ebx
je 0x4059f4
cmp dword [ebp - 8], ebx
je 0x4059f4
mov eax, dword [ebp - 0xc]
mov byte [eax + edi - 1], bl
mov eax, dword [ebp - 0x18]
cmp eax, dword [0x44eeec]
jae 0x40599c
mov ecx, dword [0x44eef0]
imul eax, eax, 0x54
mov eax, dword [eax + ecx + 4]
cmp eax, dword [ebp - 0x1c]
jne 0x40599c
push dword [ebp - 0x14]
mov ebx, edi
call fcn.00405d38
xor ebx, ebx
jmp 0x40599b
push ebx
lea eax, [ebp - 8]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x10]
call esi
cmp eax, ebx
je 0x4059f4
cmp dword [ebp - 8], ebx
je 0x4059f4
cmp edi, dword [0x44eeec]
jae 0x4056af
mov eax, dword [0x44eef0]
imul edi, edi, 0x54
mov eax, dword [edi + eax + 4]
cmp eax, dword [ebp - 0x1c]
jne 0x4056af
mov al, byte [ebp - 1]
cmp al, 3
jae 0x40569a
movzx eax, al
jmp 0x4056a4
cmp al, 6
jae 0x4056af
movzx eax, al
sub eax, 3
push eax
push dword [ebp - 0x14]
call fcn.00405c7f
pop ecx
pop ecx
cmp byte [ebp - 1], 3
jb 0x4059f4
push ebx
lea eax, [ebp - 8]
push eax
push 4
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x10]
call esi
cmp eax, ebx
je 0x4059f4
cmp dword [ebp - 8], ebx
je 0x4059f4
push dword [ebp - 0xc]
call fcn.0042629a
mov edi, eax
cmp edi, ebx
pop ecx
je 0x4059a4
push ebx
lea eax, [ebp - 8]
push eax
push dword [ebp - 0xc]
push edi
push dword [ebp - 0x10]
call esi
cmp eax, ebx
je 0x4059f4
cmp dword [ebp - 8], ebx
je 0x4059f4
mov eax, dword [ebp - 0xc]
mov byte [eax + edi - 1], bl
mov eax, dword [ebp - 0x18]
cmp eax, dword [0x44eeec]
jae 0x40599c
mov ecx, dword [0x44eef0]
imul eax, eax, 0x54
mov eax, dword [eax + ecx + 4]
cmp eax, dword [ebp - 0x1c]
jne 0x40599c
cmp eax, 5
je 0x405991
cmp eax, 0x10
je 0x405991
push edi
push dword [ebp - 0x14]
call fcn.00405dbc
jmp 0x40599a
push ebx
lea eax, [ebp - 8]
push eax
push 4
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x10]
call esi
cmp eax, ebx
je 0x4059f4
cmp dword [ebp - 8], ebx
je 0x4059f4
push ebx
lea eax, [ebp - 8]
push eax
push 4
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x10]
call esi
cmp eax, ebx
je 0x4059f4
cmp dword [ebp - 8], ebx
je 0x4059f4
cmp edi, dword [0x44eeec]
jae 0x4057c3
mov eax, dword [0x44eef0]
imul edi, edi, 0x54
add eax, edi
mov ecx, dword [eax + 4]
cmp ecx, dword [ebp - 0x1c]
jne 0x4057c3
push ebx
push ebx
push 0x1009
push dword [eax]
call dword [sym.imp.USER32.dll_SendMessageA]
cmp dword [ebp - 0x2c], ebx
mov dword [ebp - 0x24], ebx
jbe 0x4058dc
push ebx
lea eax, [ebp - 8]
push eax
push 4
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x10]
call esi
cmp eax, ebx
je 0x4058dc
cmp dword [ebp - 8], ebx
je 0x4058dc
push dword [ebp - 0xc]
call fcn.0042629a
mov edi, eax
cmp edi, ebx
pop ecx
je 0x40583d
push ebx
lea eax, [ebp - 8]
push eax
push dword [ebp - 0xc]
push edi
push dword [ebp - 0x10]
call esi
cmp eax, ebx
je 0x4058dc
cmp dword [ebp - 8], ebx
je 0x4058dc
mov eax, dword [ebp - 0x18]
cmp eax, dword [0x44eeec]
jae 0x405834
push edi
push dword [ebp - 0x14]
call fcn.00406086
pop ecx
pop ecx
push edi
call fcn.004262e0
pop ecx
jmp 0x40584c
push 1
push ebx
push dword [ebp - 0xc]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
xor eax, eax
inc eax
cmp dword [ebp - 0x28], eax
mov dword [ebp - 0x20], eax
jbe 0x4058cd
push ebx
lea eax, [ebp - 8]
push eax
push 4
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x10]
call esi
cmp eax, ebx
je 0x4058cd
cmp dword [ebp - 8], ebx
je 0x4058cd
push dword [ebp - 0xc]
call fcn.0042629a
mov edi, eax
cmp edi, ebx
pop ecx
je 0x4058b3
push ebx
lea eax, [ebp - 8]
push eax
push dword [ebp - 0xc]
push edi
push dword [ebp - 0x10]
call esi
mov eax, dword [ebp - 0x18]
cmp eax, dword [0x44eeec]
jae 0x4058aa
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x24]
push dword [ebp - 0x14]
call fcn.00405fa1
add esp, 0x10
push edi
call fcn.004262e0
pop ecx
jmp 0x4058c2
push 1
push ebx
push dword [ebp - 0xc]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
inc dword [ebp - 0x20]
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x28]
jb 0x405857
inc dword [ebp - 0x24]
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x2c]
jb 0x4057cf
mov eax, dword [ebp - 0x18]
cmp eax, dword [0x44eeec]
jae 0x4059f4
mov ecx, dword [0x44eef0]
imul eax, eax, 0x54
add eax, ecx
mov ecx, dword [ebp - 0x1c]
cmp dword [eax + 4], ecx
jne 0x4059f4
xor ecx, ecx
inc ecx
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x48], ecx
lea ecx, [ebp - 0x54]
push ecx
push ebx
push 0x102b
push dword [eax]
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x4059f4
cmp ecx, 0xb
je 0x4059b5
cmp ecx, 0xe
jbe 0x4059f4
cmp ecx, 0x10
jbe 0x4056b9
cmp ecx, 0x13
jne 0x4059f4
push ebx
lea eax, [ebp - 8]
push eax
push 4
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x10]
call esi
cmp eax, ebx
je 0x4059f4
cmp dword [ebp - 8], ebx
je 0x4059f4
cmp edi, dword [0x44eeec]
jae 0x4059f4
mov eax, dword [0x44eef0]
imul edi, edi, 0x54
mov eax, dword [edi + eax + 4]
cmp eax, dword [ebp - 0x1c]
jne 0x4059f4
push dword [ebp - 0xc]
push dword [ebp - 0x14]
call fcn.0040663b
jmp 0x4059f2
push edi
push dword [ebp - 0x14]
call fcn.00405ce2
pop ecx
pop ecx
push edi
call fcn.004262e0
jmp 0x4059f3
push 1
push ebx
push dword [ebp - 0xc]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x4059f4
push ebx
lea eax, [ebp - 8]
push eax
push 4
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x10]
call esi
cmp eax, ebx
je 0x4059f4
cmp dword [ebp - 8], ebx
je 0x4059f4
cmp edi, dword [0x44eeec]
jae 0x4059f4
mov eax, dword [0x44eef0]
imul edi, edi, 0x54
mov eax, dword [edi + eax + 4]
cmp eax, dword [ebp - 0x1c]
jne 0x4059f4
push dword [ebp - 0xc]
push dword [ebp - 0x14]
call fcn.00406402
pop ecx
pop ecx
push ebx
lea eax, [ebp - 8]
push eax
push 4
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x10]
mov dword [ebp - 0x24], 1
call esi
cmp eax, ebx
jne 0x405437
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x24], 2
jne 0x405a3c
call fcn.0041d387
push 0x30
push 0x43c9f4
push 0x43c8f0
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [ebp - 0x24]
jmp 0x405a66
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.0041d387
push 0x10
push 0x43cb90
push 0x43ca10
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
pop esi
pop edi
pop ebx
leave
ret