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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x464
push ebx
push esi
push edi
push ecx
lea edi, [ebp - 0x2e4]
mov ecx, 0xb9
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
pop ecx
mov eax, dword [0x65d240]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], ecx
mov ecx, 0x673355
call fcn.004b2267
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
push 0xff
push 0
lea eax, [ebp - 0x124]
push eax
call fcn.004af43b
add esp, 0xc
mov dword [ebp - 0x130], 0
mov dword [ebp - 0x13c], 0
mov dword [ebp - 0x178], 2
mov dword [ebp - 0x184], 0xc
mov dword [ebp - 0x190], 7
mov al, byte [0x61d6f3]
mov byte [ebp - 0x2b0], al
push 0xfe
push 0
lea eax, [ebp - 0x2af]
push eax
call fcn.004af43b
add esp, 0xc
mov al, byte [0x61d6f3]
mov byte [ebp - 0x2d0], al
xor eax, eax
mov dword [ebp - 0x2cf], eax
mov word [ebp - 0x2cb], ax
mov byte [ebp - 0x2c9], al
mov al, byte [0x61d6f3]
mov byte [ebp - 0x2c8], al
xor eax, eax
mov dword [ebp - 0x2c7], eax
mov word [ebp - 0x2c3], ax
mov byte [ebp - 0x2c1], al
mov al, byte [0x61d6f3]
mov byte [ebp - 0x2c0], al
xor eax, eax
mov dword [ebp - 0x2bf], eax
mov word [ebp - 0x2bb], ax
mov byte [ebp - 0x2b9], al
cmp dword [0x668b04], 1
je 0x4da2cc
cmp dword [0x668b04], 2
je 0x4da2cc
cmp dword [0x668b04], 3
je 0x4da2cc
cmp dword [0x668b04], 4
je 0x4da2cc
cmp dword [0x668b04], 5
je 0x4da2cc
cmp dword [0x668b04], 6
je 0x4da2cc
cmp dword [0x668b04], 7
je 0x4da2cc
mov ecx, 0x668a08
call fcn.004b17f9
push eax
push 0x61f180
mov eax, dword [ebp - 0xc]
add eax, 0x558
push eax
call fcn.004af2ab
add esp, 0xc
mov esi, esp
push 0
push str.Read_File_Error
mov eax, dword [ebp - 0xc]
add eax, 0x558
push eax
mov ecx, dword [0x66663c]
push ecx
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp esi, esp
call fcn.004b09a3
mov dword [ebp - 0x190], 5
mov dword [ebp - 0x148], 0
jmp 0x4da2e7
mov eax, dword [ebp - 0x148]
add eax, 1
mov dword [ebp - 0x148], eax
cmp dword [ebp - 0x148], 3
jge 0x4da331
mov eax, dword [ebp - 0x148]
movzx ecx, byte [eax + 0x666670]
cmp ecx, 1
jne 0x4da32f
mov eax, dword [ebp - 0x148]
push eax
mov ecx, dword [ebp - 0x148]
lea edx, [ecx*8 + 0x666673]
push edx
mov ecx, dword [ebp - 0xc]
add ecx, 0x10
call fcn.004aff76
mov eax, dword [ebp - 0x148]
mov byte [eax + 0x666670], 0
jmp 0x4da2d8
mov ecx, dword [ebp - 0xc]
call fcn.004b0a5c
mov dword [ebp - 0x190], eax
mov eax, dword [ebp - 0xc]
mov byte [eax + 0x661], 0
mov esi, esp
push 0
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp esi, esp
call fcn.004b09a3
mov dword [ebp - 0x160], eax
mov eax, dword [ebp - 0x160]
xor edx, edx
mov ecx, 0x64
div ecx
mov dword [ebp - 0x16c], eax
mov esi, esp
push 0x64
push 0
push 0x406
mov eax, dword [0x66666c]
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
cmp esi, esp
call fcn.004b09a3
mov esi, esp
push 0
push 1
push 0x404
mov eax, dword [0x66666c]
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
cmp esi, esp
call fcn.004b09a3
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x658], 0
mov esi, esp
push 0
push 0
push 0
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp esi, esp
call fcn.004b09a3
mov esi, esp
push 0x61d6f3
mov eax, dword [0x666654]
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
cmp esi, esp
call fcn.004b09a3
cmp dword [ebp - 0x190], 7
jne 0x4daa94
mov ecx, dword [ebp - 0xc]
add ecx, 0x520
call fcn.004b188a
push 0xff
push 0
lea eax, [ebp - 0x124]
push eax
call fcn.004af43b
add esp, 0xc
mov dword [ebp - 0x154], 0
mov eax, dword [ebp - 0xc]
mov byte [eax + 0x660], 0
mov esi, esp
push 1
push 0
push 0
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp esi, esp
call fcn.004b09a3
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x65c], eax
mov dword [ebp - 0x19c], 0
cmp dword [0x668b04], 3
je 0x4da482
cmp dword [0x668b04], 6
jne 0x4da5ca
mov dword [ebp - 0x184], 0xa
mov eax, dword [ebp - 0xc]
mov dword [eax + 8], 5
mov eax, dword [ebp - 0x154]
mov dword [ebp - 0x148], eax
jmp 0x4da4b3
mov eax, dword [ebp - 0x148]
add eax, 1
mov dword [ebp - 0x148], eax
mov eax, dword [ebp - 0x148]
cmp eax, dword [ebp - 0x184]
jg 0x4da5c5
push 8
push 0
lea eax, [ebp - 0x1c]
push eax
call fcn.004af43b
add esp, 0xc
mov esi, esp
push 0
lea eax, [ebp - 0x130]
push eax
push 8
lea ecx, [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [edx]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp esi, esp
call fcn.004b09a3
cmp dword [ebp - 0x130], 0
jne 0x4da528
cmp dword [ebp - 0x19c], 0
jbe 0x4da517
mov dword [ebp - 0x178], 1
jmp 0x4da521
mov dword [ebp - 0x178], 0
jmp 0x4da5c5
mov eax, dword [ebp - 0x148]
lea ecx, [ebp + eax*8 - 0x124]
push ecx
lea edx, [ebp - 0x1c]
push edx
mov ecx, dword [ebp - 0xc]
add ecx, 0x10
call fcn.004b19b1
mov eax, dword [ebp - 0x19c]
add eax, dword [ebp - 0x130]
mov dword [ebp - 0x19c], eax
cmp dword [ebp - 0x130], 8
jae 0x4da56c
mov dword [ebp - 0x178], 1
jmp 0x4da5c5
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x658]
add ecx, dword [ebp - 0x130]
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x658], ecx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x16c]
cmp ecx, dword [eax + 0x658]
ja 0x4da5c0
mov esi, esp
push 0
push 0
push 0x405
mov eax, dword [0x66666c]
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
cmp esi, esp
call fcn.004b09a3
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x658], 0
jmp 0x4da4a4
jmp 0x4da918
cmp dword [0x668b04], 4
je 0x4da5e0
cmp dword [0x668b04], 7
jne 0x4da728
mov dword [ebp - 0x184], 9
mov eax, dword [ebp - 0xc]
mov dword [eax + 8], 6
mov eax, dword [ebp - 0x154]
mov dword [ebp - 0x148], eax
jmp 0x4da611
mov eax, dword [ebp - 0x148]
add eax, 1
mov dword [ebp - 0x148], eax
mov eax, dword [ebp - 0x148]
cmp eax, dword [ebp - 0x184]
jg 0x4da723
push 8
push 0
lea eax, [ebp - 0x1c]
push eax
call fcn.004af43b
add esp, 0xc
mov esi, esp
push 0
lea eax, [ebp - 0x130]
push eax
push 8
lea ecx, [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [edx]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp esi, esp
call fcn.004b09a3
cmp dword [ebp - 0x130], 0
jne 0x4da686
cmp dword [ebp - 0x19c], 0
jbe 0x4da675
mov dword [ebp - 0x178], 1
jmp 0x4da67f
mov dword [ebp - 0x178], 0
jmp 0x4da723
mov eax, dword [ebp - 0x148]
lea ecx, [ebp + eax*8 - 0x124]
push ecx
lea edx, [ebp - 0x1c]
push edx
mov ecx, dword [ebp - 0xc]
add ecx, 0x10
call fcn.004b19b1
mov eax, dword [ebp - 0x19c]
add eax, dword [ebp - 0x130]
mov dword [ebp - 0x19c], eax
cmp dword [ebp - 0x130], 8
jae 0x4da6ca
mov dword [ebp - 0x178], 1
jmp 0x4da723
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x658]
add ecx, dword [ebp - 0x130]
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x658], ecx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x16c]
cmp ecx, dword [eax + 0x658]
ja 0x4da71e
mov esi, esp
push 0
push 0
push 0x405
mov eax, dword [0x66666c]
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
cmp esi, esp
call fcn.004b09a3
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x658], 0
jmp 0x4da602
jmp 0x4da918
mov dword [ebp - 0x184], 0xc
mov eax, dword [ebp - 0x154]
mov dword [ebp - 0x148], eax
jmp 0x4da74f
mov eax, dword [ebp - 0x148]
add eax, 1
mov dword [ebp - 0x148], eax
mov eax, dword [ebp - 0x148]
cmp eax, dword [ebp - 0x184]
jge 0x4da918
push 8
push 0
lea eax, [ebp - 0x1c]
push eax
call fcn.004af43b
add esp, 0xc
mov esi, esp
push 0
lea eax, [ebp - 0x130]
push eax
push 8
lea ecx, [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [edx]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp esi, esp
call fcn.004b09a3
cmp dword [ebp - 0x130], 0
jne 0x4da7c4
cmp dword [ebp - 0x19c], 0
jbe 0x4da7b3
mov dword [ebp - 0x178], 1
jmp 0x4da7bd
mov dword [ebp - 0x178], 0
jmp 0x4da918
mov eax, dword [ebp - 0x148]
lea ecx, [ebp + eax*8 - 0x124]
push ecx
lea edx, [ebp - 0x1c]
push edx
mov ecx, dword [ebp - 0xc]
add ecx, 0x10
call fcn.004b19b1
mov eax, dword [ebp - 0x19c]
add eax, dword [ebp - 0x130]
mov dword [ebp - 0x19c], eax
lea eax, [ebp - 0x124]
push eax
call fcn.004b2974
add esp, 4
cmp eax, 0x24
jb 0x4da890
lea eax, [ebp - 0x124]
push eax
mov ecx, dword [ebp - 0xc]
call fcn.004af553
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 8]
mov dword [ebp - 0x464], ecx
mov edx, dword [ebp - 0x464]
sub edx, 1
mov dword [ebp - 0x464], edx
cmp dword [ebp - 0x464], 0x62
ja case.0x4da84b.4
mov eax, dword [ebp - 0x464]
movzx ecx, byte [eax + 0x4dac00]
jmp dword [ecx*4 + 0x4dabe8]
mov dword [ebp - 0x184], 7
jmp case.0x4da84b.4
mov dword [ebp - 0x184], 5
jmp case.0x4da84b.4
mov dword [ebp - 0x184], 5
jmp case.0x4da84b.4
mov dword [ebp - 0x184], 6
jmp case.0x4da84b.4
mov dword [ebp - 0x184], 6
jmp 0x4da8aa
mov eax, dword [ebp - 0x148]
add eax, 1
cmp eax, 5
jne 0x4da8aa
mov eax, dword [ebp - 0xc]
mov byte [eax + 0x660], 1
jmp 0x4da918
cmp dword [ebp - 0x130], 8
jae 0x4da8bf
mov dword [ebp - 0x178], 1
jmp 0x4da918
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x658]
add ecx, dword [ebp - 0x130]
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x658], ecx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x16c]
cmp ecx, dword [eax + 0x658]
ja 0x4da913
mov esi, esp
push 0
push 0
push 0x405
mov eax, dword [0x66666c]
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
cmp esi, esp
call fcn.004b09a3
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x658], 0
jmp 0x4da740
cmp dword [ebp - 0x178], 0
jne 0x4da926
jmp 0x4daa94
cmp dword [0x666690], 0
jne 0x4da953
mov eax, dword [ebp - 0xc]
movzx ecx, byte [eax + 0x661]
test ecx, ecx
jne 0x4da953
mov eax, dword [ebp - 0x19c]
push eax
lea ecx, [ebp - 0x124]
push ecx
mov ecx, dword [ebp - 0xc]
call fcn.004ad2e4
cmp dword [0x666690], 0
jne 0x4da9af
mov eax, dword [ebp - 0xc]
movzx ecx, byte [eax + 0x661]
test ecx, ecx
jne 0x4da9af
mov esi, esp
push 0
lea eax, [ebp - 0x13c]
push eax
mov ecx, dword [ebp - 0xc]
add ecx, 0x520
call fcn.004b09d5
push eax
mov ecx, dword [ebp - 0xc]
add ecx, 0x520
call fcn.004af076
push eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp esi, esp
call fcn.004b09a3
mov dword [ebp - 0x1a8], eax
jmp 0x4da9e2
mov esi, esp
push 0
lea eax, [ebp - 0x13c]
push eax
mov ecx, dword [ebp - 0x19c]
push ecx
lea edx, [ebp - 0x124]
push edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp esi, esp
call fcn.004b09a3
mov dword [ebp - 0x1a8], eax
cmp dword [ebp - 0x1a8], 0
je 0x4daa1c
cmp dword [0x66668c], 0
jne 0x4daa1a
mov esi, esp
push 0
lea eax, [ebp - 0x13c]
push eax
push 2
push 0x6211ec
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp esi, esp
call fcn.004b09a3
jmp 0x4daa3f
mov esi, esp
push 0
push str.ERROR_WRITE
push 0x621200
mov eax, dword [0x66663c]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp esi, esp
call fcn.004b09a3
jmp 0x4daa94
cmp dword [ebp - 0x178], 1
jne 0x4daa4a
jmp 0x4daa94
mov eax, dword [0x66663c]
push eax
call fcn.004ae518
add esp, 4
cmp eax, 6
jne 0x4daa8f
mov esi, esp
push 0
lea eax, [ebp - 0x13c]
push eax
push 7
push str.CANCEL
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp esi, esp
call fcn.004b09a3
mov dword [ebp - 0x190], 6
jmp 0x4daa94
jmp 0x4da3f9
mov esi, esp
push 0
lea eax, [ebp - 0x13c]
push eax
push 3
push 0x61f1c4
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp esi, esp
call fcn.004b09a3
mov esi, esp
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, esp
call fcn.004b09a3
mov esi, esp
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, esp
call fcn.004b09a3
mov esi, esp
push 0
mov eax, dword [ebp - 0x160]
push eax
push 0x402
mov ecx, dword [0x66666c]
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
cmp esi, esp
call fcn.004b09a3
movzx eax, byte [ebp + 8]
cmp eax, 1
jne 0x4dab35
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x45c], esp
push 0x668a40
call fcn.004b0345
mov eax, dword [0x666654]
push eax
call fcn.004b1beb
add esp, 0x20
mov eax, dword [ebp - 0x190]
push edx
mov ecx, ebp
push eax
lea edx, [0x4dab6c]
call fcn.004b00b6
pop eax
pop edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004af350
add esp, 0x464
cmp ebp, esp
call fcn.004b09a3
mov esp, ebp
pop ebp
ret 4