Function at 0x408f30
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov ecx, dword [0x448c78]
xor eax, eax
mov word [ebp - 8], 2
cmp word [ebp - 8], 2
push ebx
sete al
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [sym.imp.MSVCR100.dll_fread]
mov dword [ebp - 0x1c], eax
lea eax, [esi*8]
sub eax, esi
add eax, eax
add eax, eax
add eax, eax
mov ebx, dword [eax + ecx]
push ebx
push 1
lea esi, [esi + esi*8]
push 0xb
shl esi, 4
push 0x444520
mov dword [ebp - 0x14], eax
mov dword [esi + 0x443ae4], 0
call edi
push ebx
call dword [sym.imp.MSVCR100.dll_rewind]
add esp, 0x14
push 0xb
push str._stata_dta_
push 0x444520
call dword [sym.imp.MSVCR100.dll__strnicmp]
add esp, 0xc
test eax, eax
jne 0x408fc2
mov edx, dword [ebp + 8]
push edx
call fcn.00409350
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
push 1
lea eax, [ebp - 1]
push 1
push eax
call edi
mov al, byte [ebp - 1]
add esp, 0x10
cmp al, 0x6c
jge 0x408ffb
mov ecx, dword [ebp + 8]
push str.Stata
inc ecx
push ecx
push str.The_level__d_file_does_not_seem_to_be_a__s_file__n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 0xc
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
jne 0x409006
mov dword [ebp - 0x10], 6
jmp 0x40905b
cmp al, 0x6e
jne 0x409013
mov dword [ebp - 0x10], 7
jmp 0x40905b
cmp al, 0x71
je 0x409054
cmp al, 0x6f
je 0x409054
cmp al, 0x72
jne 0x409028
mov dword [ebp - 0x10], 0xa
jmp 0x40905b
cmp al, 0x73
jne 0x409035
mov dword [ebp - 0x10], 0xb
jmp 0x40905b
push str.HLM_HCM
push str.So_sorry__but__s_cannot_read_this_version_of_stata._n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 8
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x10], 8
mov edx, dword [ebp - 0x10]
push ebx
push 1
lea eax, [ebp - 1]
push 1
push eax
mov dword [esi + 0x443af8], edx
call edi
mov al, byte [ebp - 1]
add esp, 0x10
cmp al, 1
jne 0x409148
cmp dword [ebp - 0x1c], 0
jne 0x40915a
push ebx
push 1
lea ecx, [ebp - 1]
push 1
push ecx
call edi
push ebx
push 1
lea edx, [ebp - 1]
push 1
push edx
call edi
push ebx
push 1
lea eax, [ebp - 8]
push 2
push eax
call edi
mov ax, word [ebp - 8]
mov edx, dword [0x448c78]
movsx ecx, ax
push ebx
mov word [esi + 0x443ae8], ax
mov eax, dword [ebp - 0x14]
push 1
mov dword [eax + edx + 4], ecx
lea ecx, [esi + 0x443ae0]
push 4
push ecx
call edi
add esp, 0x40
push 1
push 0
push 0x63
push ebx
call dword [sym.imp.MSVCR100.dll__fseeki64]
movsx eax, word [ebp - 8]
mov edi, eax
shl edi, 4
add edi, eax
add esp, 0x10
add edi, edi
call fcn.00406e80
movsx ecx, word [ebp - 8]
lea edx, [ecx + eax]
lea edi, [ecx*4]
mov dword [esi + 0x443aec], eax
mov dword [esi + 0x443afc], edx
call fcn.00406e80
mov cx, word [ebp - 8]
mov edi, dword [esi + 0x443afc]
mov dword [esi + 0x443af4], eax
movsx eax, cx
test eax, eax
je 0x409174
push ebx
push 1
push eax
mov eax, dword [esi + 0x443aec]
mov esi, dword [sym.imp.MSVCR100.dll_fread]
push eax
call esi
mov cx, word [ebp - 8]
add esp, 0x10
jmp 0x40917a
cmp al, 2
jne 0x409087
cmp dword [ebp - 0x1c], 0
jne 0x409087
push str.This_file_seems_to_have_been_created_on_a_different_platform__n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.MSVCR100.dll_fread]
cmp dword [ebp - 0x10], 7
jl 0x40919c
movsx edx, cx
mov eax, edx
shl eax, 5
add eax, edx
je 0x4091ce
push ebx
push 1
push eax
push edi
call esi
mov cx, word [ebp - 8]
add esp, 0x10
jmp 0x4091ce
xor eax, eax
xor edx, edx
mov dword [ebp - 0x18], eax
cmp dx, cx
jge 0x4091ce
mov ecx, eax
push ebx
shl ecx, 5
push 1
add ecx, edi
add ecx, eax
push 9
push ecx
call esi
mov cx, word [ebp - 8]
mov eax, dword [ebp - 0x18]
movsx edx, cx
inc eax
add esp, 0x10
mov dword [ebp - 0x18], eax
cmp eax, edx
jl 0x4091a8
xor eax, eax
xor edx, edx
mov dword [ebp - 0x14], eax
cmp dx, cx
jge 0x40924b
mov dword [ebp - 0x1c], eax
mov esi, edi
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4091e4
sub eax, edx
cmp eax, 8
ja 0x409262
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4091f7
sub eax, edx
mov dword [ebp - 0x18], eax
cmp eax, 0x21
jge 0x409222
mov ecx, dword [ebp - 0x1c]
mov edx, 0x21
sub edx, eax
push edx
add ecx, eax
add ecx, edi
push 0
push ecx
call sub.MSVCR100.dll_memset
add esp, 0xc
mov eax, 8
call fcn.00406820
mov cx, word [ebp - 8]
mov eax, dword [ebp - 0x14]
add dword [ebp - 0x1c], 0x21
movsx edx, cx
inc eax
add esi, 0x21
mov dword [ebp - 0x14], eax
cmp eax, edx
jl 0x4091df
mov esi, dword [sym.imp.MSVCR100.dll_fread]
mov edx, dword [ebp - 0x10]
movsx eax, cx
lea ecx, [eax + eax + 2]
cmp edx, 0xa
jge 0x40927c
lea edi, [eax + eax*2]
lea ecx, [ecx + edi*4]
jmp 0x409283
push str.Stata_may_allow_for_variable_name_lengths___8__but_not_the_HLMs__n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, eax
imul edi, edi, 0x31
add ecx, edi
cmp edx, 7
jl 0x409293
mov edx, eax
shl edx, 5
add edx, ecx
add eax, edx
jmp 0x409298
add ecx, eax
lea eax, [ecx + eax*8]
mov edi, dword [sym.imp.MSVCR100.dll__fseeki64]
cdq
push 1
push edx
push eax
push ebx
call edi
movsx eax, word [ebp - 8]
imul eax, eax, 0x51
cdq
push 1
push edx
push eax
push ebx
call edi
add esp, 0x20
mov dword [ebp - 0x14], 0
nop
push ebx
push 1
lea edx, [ebp - 1]
push 1
push edx
call esi
add esp, 0x10
cmp dword [ebp - 0x10], 7
push ebx
push 1
jl 0x4092f4
lea eax, [ebp - 0x18]
push 4
push eax
call esi
mov eax, dword [ebp - 0x18]
add esp, 0x10
cmp byte [ebp - 1], 0
jne 0x409314
test eax, eax
jne 0x409314
inc dword [ebp - 0x14]
jmp 0x40931f
lea ecx, [ebp - 0xc]
push 2
push ecx
call esi
mov ax, word [ebp - 0xc]
add esp, 0x10
cmp byte [ebp - 1], 0
jne 0x409313
test ax, ax
jne 0x409313
inc dword [ebp - 0x14]
jmp 0x40931f
cwde
cdq
push 1
push edx
push eax
push ebx
call edi
add esp, 0x10
cmp dword [ebp - 0x14], 0
je 0x4092c0
push ebx
call dword [sym.imp.MSVCR100.dll__ftelli64]
mov ecx, dword [ebp + 8]
add esp, 4
pop edi
pop esi
mov dword [ecx*8 + 0x448be0], eax
mov dword [ecx*8 + 0x448be4], edx
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret