Function at 0x40ad70
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 1], cl
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x40b426
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 2], 0
mov dword [0x40d730], 0x4034b51
dec dword [0x40d730]
mov byte [ebp - 9], 0
mov eax, dword [0x40c42c]
mov eax, dword [eax]
xor edx, edx
call fcn.0040b9d8
inc eax
jne 0x40addd
push 0x10
push 0x40b438
push 0x40b444
push 0
call sub.user32.dll_MessageBoxA
jmp 0x40b403
push esi
push ebx
call sub.user32.dll_GetDlgItem
mov dword [ebp - 0x20], eax
mov eax, 0x102
call fcn.004024e8
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x40b3fc
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x40c400]
mov dword [eax], 0xffffffff
mov eax, dword [0x40c3e4]
mov byte [eax], 0
cmp byte [ebp - 1], 0
je 0x40b342
push 0
push 0
push 0x184
mov eax, dword [ebp - 0x20]
push eax
call sub.user32.dll_SendMessageA
jmp 0x40b342
mov eax, dword [0x40c3f8]
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
push 0
lea eax, [ebp - 0x28]
push eax
movzx eax, word [0x40d75a]
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [0x40d738]
push eax
call sub.KERNEL32.DLL_ReadFile
lea ecx, [ebp - 0x18]
mov dx, word [0x40d75a]
mov eax, dword [ebp - 8]
call fcn.0040bc58
cmp dword [ebp - 0x18], 0
jne 0x40ae92
push 0x10
push 0x40b438
push 0x40b45c
push 0
call sub.user32.dll_MessageBoxA
call fcn.00402c94
jmp 0x40b403
mov eax, dword [0x40c3e4]
cmp byte [eax], 0
jne 0x40aec6
mov edx, dword [ebp - 0x18]
mov eax, 0x40b478
call fcn.004035b4
test eax, eax
jg 0x40aebe
mov edx, dword [ebp - 0x18]
mov eax, 0x40b484
call fcn.004035b4
test eax, eax
jle 0x40aec6
mov eax, dword [0x40c3e4]
mov byte [eax], 1
cmp byte [ebp - 1], 0
je 0x40aeea
mov eax, dword [ebp - 0x18]
call fcn.004034ec
push eax
push 0
push 0x180
mov eax, dword [ebp - 0x20]
push eax
call sub.user32.dll_SendMessageA
jmp 0x40b326
mov eax, dword [ebp - 0x18]
call fcn.004034ec
mov edx, eax
mov eax, dword [ebp - 0x20]
call fcn.0040b884
test al, al
je 0x40b326
mov byte [ebp - 9], 0
mov ax, word [0x40d746]
and ax, 1
cmp ax, 1
jne 0x40b051
sub dword [0x40d734], 0xc
xor eax, eax
push ebp
push 0x40b045
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, 0x18
call fcn.004024e8
mov dword [ebp - 0x10], eax
push 0
lea eax, [ebp - 0x28]
push eax
push 0xc
mov ebx, dword [ebp - 0x10]
push ebx
mov eax, dword [0x40d738]
push eax
call sub.KERNEL32.DLL_ReadFile
mov eax, dword [ebp - 0x10]
lea edx, [eax + 0xc]
mov eax, ebx
mov ecx, 0xc
call fcn.00402608
xor eax, eax
push ebp
push 0x40b034
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x40c410]
cmp dword [eax], 0
je 0x40afa7
mov eax, dword [0x40d74e]
push eax
mov eax, dword [0x40d74a]
push eax
mov eax, dword [0x40c410]
mov eax, dword [eax]
push eax
mov cx, word [0x40d746]
mov dl, 0xc
mov eax, dword [ebp - 0x10]
call fcn.0040b6a0
mov byte [ebp - 9], al
cmp byte [ebp - 9], 0
jne 0x40b01e
xor ebx, ebx
push 0x40a2d0
mov edx, 0x40b488
mov eax, dword [0x40c430]
mov eax, dword [eax]
xor ecx, ecx
call fcn.00404ad4
lea ecx, [ebp - 0x48]
mov edx, dword [0x40c450]
mov dx, word [edx]
mov eax, dword [0x40c3ec]
call fcn.0040bc58
mov edx, dword [ebp - 0x48]
mov eax, dword [0x40c410]
call fcn.00403130
mov eax, dword [0x40d74e]
push eax
mov eax, dword [0x40d74a]
push eax
mov eax, dword [0x40c410]
mov eax, dword [eax]
push eax
mov cx, word [0x40d746]
mov dl, 0xc
mov eax, dword [ebp - 0x10]
call fcn.0040b6a0
mov byte [ebp - 9], al
cmp byte [ebp - 9], 0
jne 0x40b01e
inc ebx
cmp bl, 3
jne 0x40afaf
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40b03b
mov eax, dword [ebp - 0x10]
call fcn.00402500
ret
mov byte [ebp - 9], 1
cmp byte [ebp - 9], 0
je 0x40b34f
mov eax, dword [0x40c440]
call fcn.0040bda8
call fcn.0040b9c0
push eax
mov eax, dword [0x40c440]
call fcn.0040bde0
lea ecx, [ebp - 0x48]
pop edx
call fcn.0040bc58
push dword [ebp - 0x48]
push 0x40b478
push dword [ebp - 0x18]
lea eax, [ebp - 0x1c]
mov edx, 3
call fcn.004033e8
mov eax, dword [ebp - 0x1c]
call fcn.004034ec
mov ebx, eax
mov eax, ebx
call fcn.0040bb6c
test al, al
je 0x40b13b
mov eax, dword [0x40c43c]
mov al, byte [eax]
dec al
je 0x40b0c7
dec al
je 0x40b0e4
jmp 0x40b177
mov eax, dword [0x40c400]
mov eax, dword [eax]
push eax
push 0
push 0x185
mov eax, dword [ebp - 0x20]
push eax
call sub.user32.dll_SendMessageA
jmp 0x40b326
lea edx, [ebp - 0x48]
mov eax, dword [ebp - 0x1c]
call fcn.0040bac8
mov edx, dword [ebp - 0x48]
mov eax, dword [0x40c41c]
call fcn.00403130
push 0x40a134
mov edx, 0x40b490
mov eax, dword [0x40c430]
mov eax, dword [eax]
xor ecx, ecx
call fcn.00404ad4
mov eax, dword [0x40c438]
cmp byte [eax], 0
jne 0x40b177
mov eax, dword [0x40c400]
mov eax, dword [eax]
push eax
push 0
push 0x185
mov eax, dword [ebp - 0x20]
push eax
call sub.user32.dll_SendMessageA
jmp 0x40b326
lea edx, [ebp - 0x14]
mov eax, dword [ebp - 0x1c]
call fcn.0040ba00
mov eax, dword [ebp - 0x14]
call fcn.0040bd00
mov eax, dword [ebp - 0x14]
call fcn.004034ec
mov esi, eax
mov eax, esi
call fcn.0040bb6c
test al, al
jne 0x40b177
push 0x10
push 0x40b49c
push esi
push 0
call sub.user32.dll_MessageBoxA
jmp 0x40b34f
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push ebx
call sub.KERNEL32.DLL_CreateFileA
mov dword [0x40d73c], eax
cmp dword [0x40d73c], 0xffffffff
je 0x40b2de
xor eax, eax
push ebp
push 0x40b2d7
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0x40b289
push dword fs:[eax]
mov dword fs:[eax], esp
push 1
push 0
push 0
push 0
lea eax, [ebp - 0x44]
push eax
call sub.user32.dll_PeekMessageA
lea eax, [ebp - 0x44]
push eax
call sub.user32.dll_TranslateMessage
lea eax, [ebp - 0x44]
push eax
call sub.user32.dll_DispatchMessageA
mov dword [0x40d720], 0xffffffff
mov eax, dword [0x40d752]
mov dword [0x40d734], eax
mov ax, word [0x40d746]
and ax, 1
cmp ax, 1
jne 0x40b20b
sub dword [0x40d734], 0xc
mov ax, word [0x40d748]
sub ax, 1
jb 0x40b21f
sub ax, 7
je 0x40b226
jmp 0x40b22d
call fcn.0040b8bc
jmp 0x40b257
call fcn.00405bc8
jmp 0x40b257
push 0x10
push 0x40b438
push 0x40b4b4
push 0
call sub.user32.dll_MessageBoxA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
call fcn.00402c94
call fcn.00402c94
jmp 0x40b403
mov eax, dword [0x40d720]
xor eax, 0xffffffff
cmp eax, dword [0x40d74e]
jne 0x40b27f
mov eax, dword [0x40c400]
mov eax, dword [eax]
push eax
push 0
push 0x185
mov eax, dword [ebp - 0x20]
push eax
call sub.user32.dll_SendMessageA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x40b293
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40b326
mov edx, dword [0x40d74a]
mov eax, dword [0x40d73c]
call fcn.0040b7c0
mov eax, dword [0x40d73c]
push eax
call sub.KERNEL32.DLL_CloseHandle
test eax, eax
jne 0x40b2d6
push 0x10
push 0x40b4d0
mov eax, dword [ebp - 0x1c]
call fcn.004034ec
push eax
push 0
call sub.user32.dll_MessageBoxA
ret
mov eax, dword [ebp - 0x1c]
call fcn.004034ec
mov ebx, eax
push ebx
call sub.KERNEL32.DLL_GetFileAttributesA
mov esi, eax
push ebx
call sub.KERNEL32.DLL_GetFileAttributesA
and eax, 0xffffffef
cmp esi, eax
jne 0x40b30e
push 0x10
push 0x40b4e8
push ebx
push 0
call sub.user32.dll_MessageBoxA
jmp 0x40b326
mov eax, dword [0x40c400]
mov eax, dword [eax]
push eax
push 0
push 0x185
mov eax, dword [ebp - 0x20]
push eax
call sub.user32.dll_SendMessageA
mov eax, dword [ebp - 0x24]
add eax, 0x1e
movzx edx, word [0x40d75a]
add eax, edx
add eax, dword [0x40d752]
xor edx, edx
call fcn.0040b9d8
call fcn.0040accc
test al, al
jne 0x40ae36
cmp byte [ebp - 9], 0
je 0x40b3b7
cmp byte [ebp - 1], 0
jne 0x40b3b7
push 0
push 0
push 0x190
mov eax, dword [ebp - 0x20]
push eax
call sub.user32.dll_SendMessageA
test eax, eax
jne 0x40b39e
mov eax, dword [0x40c420]
cmp byte [eax], 0
jne 0x40b398
mov eax, dword [0x40c404]
cmp byte [eax], 0
je 0x40b398
push 0
push 0x40b4fc
push 0x40b508
push 0
call sub.user32.dll_MessageBoxA
mov byte [ebp - 2], 1
jmp 0x40b3e6
push 0x10
push 0x40b438
push 0x40b528
push 0
call sub.user32.dll_MessageBoxA
mov byte [ebp - 2], 0
jmp 0x40b3e6
cmp byte [ebp - 1], 0
je 0x40b3e6
push 0
push 0
push 0x18b
mov eax, dword [ebp - 0x20]
push eax
call sub.user32.dll_SendMessageA
test eax, eax
jne 0x40b3e6
push 0x10
push 0x40b438
push 0x40b444
push 0
call sub.user32.dll_MessageBoxA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40b403
mov eax, dword [ebp - 8]
call fcn.00402500
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40b42d
lea eax, [ebp - 0x48]
call fcn.004030dc
lea eax, [ebp - 0x1c]
mov edx, 3
call fcn.00403100
ret