Function at 0x40c680
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov ecx, dword [ebp + 8]
mov edx, dword [0x468ec0]
xor eax, eax
mov word [ebp - 4], 2
cmp word [ebp - 4], 2
push ebx
sete al
push esi
mov esi, dword [sym.imp.MSVCR100.dll_fread]
push edi
mov dword [ebp - 0x18], eax
lea eax, [ecx*8]
sub eax, ecx
add eax, eax
add eax, eax
add eax, eax
mov ebx, dword [eax + edx]
push ebx
mov dword [ebp - 0x20], eax
push 1
lea eax, [ecx + ecx*8]
shl eax, 4
push 0xb
push 0x472ac0
mov dword [ebp - 0x10], eax
mov dword [eax + 0x468d04], 0
call esi
mov edi, dword [sym.imp.MSVCR100.dll__strnicmp]
push 0xb
push str._stata_dta_
push 0x472ac0
call edi
add esp, 0x1c
test eax, eax
je 0x40c709
mov eax, dword [ebp + 8]
push str.Stata__stata_dta_
inc eax
push eax
jmp 0x40ce52
push ebx
push 1
push 8
push 0x472ac0
call esi
push 8
push str._header_
push 0x472ac0
call edi
add esp, 0x1c
test eax, eax
je 0x40c734
push str.Stata__header_
jmp 0x40ce4d
push ebx
push 1
push 9
push 0x472ac0
call esi
push 9
push str._release_
push 0x472ac0
call edi
add esp, 0x1c
test eax, eax
je 0x40c764
mov edx, dword [ebp + 8]
push str.Stata__release_
inc edx
push edx
jmp 0x40ce52
push ebx
push 1
push 3
push 0x472ac0
call esi
push 0x472ac0
mov byte [0x472ac3], 0
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 0x14
mov dword [ebp - 0x14], eax
cmp eax, 0x76
jle 0x40c79c
mov eax, dword [ebp + 8]
push str.Stata__releaseno_
inc eax
push eax
jmp 0x40ce52
sub eax, 0x75
je 0x40c7d3
dec eax
je 0x40c7bd
dec eax
jne 0x40c7e7
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x468d18], 0xf
mov dword [ebp - 0x1c], 0x81
jmp 0x40c7e7
mov edx, dword [ebp - 0x10]
mov dword [edx + 0x468d18], 0xe
mov dword [ebp - 0x1c], 0x81
jmp 0x40c7e7
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x468d18], 0xd
mov dword [ebp - 0x1c], 0x21
push ebx
push 1
push 0xa
push 0x472ac0
call esi
push 0xa
push str.__release_
push 0x472ac0
call edi
add esp, 0x1c
test eax, eax
je 0x40c812
push str.Stata___release_
jmp 0x40ce4d
push ebx
push 1
push 0xb
push 0x472ac0
call esi
push 0xb
push str._byteorder_
push 0x472ac0
call edi
add esp, 0x1c
test eax, eax
je 0x40c842
mov edx, dword [ebp + 8]
push str.Stata__byteorder_
inc edx
push edx
jmp 0x40ce52
push ebx
push 1
push 3
push 0x472ac0
call esi
push 3
push 0x45fc6c
push 0x472ac0
mov byte [0x472ac3], 0
call edi
add esp, 0x1c
test eax, eax
jne 0x40c87e
cmp dword [ebp - 0x18], eax
jne 0x40c8a0
mov eax, dword [ebp + 8]
push str.Stata__byteorder_
inc eax
push eax
jmp 0x40ce52
push 3
push 0x45fc70
push 0x472ac0
call edi
add esp, 0xc
test eax, eax
jne 0x40ce48
cmp dword [ebp - 0x18], eax
je 0x40ce48
push ebx
push 1
push 0xc
push 0x472ac0
call esi
push 0xc
push str.__byteorder_
push 0x472ac0
call edi
add esp, 0x1c
test eax, eax
je 0x40c8d0
mov edx, dword [ebp + 8]
push str.Stata___byteorder_
inc edx
push edx
jmp 0x40ce52
push ebx
push 1
push 3
push 0x472ac0
call esi
push 3
push 0x45fc98
push 0x472ac0
call edi
add esp, 0x1c
test eax, eax
je 0x40c900
mov eax, dword [ebp + 8]
push str.Stata__K_
inc eax
push eax
jmp 0x40ce52
mov ecx, dword [ebp - 0x10]
cmp dword [ecx + 0x468d18], 0x77
jne 0x40c91b
mov edx, dword [ebp + 8]
push str.Cannot_read_files_with___32_767_variables
inc edx
push edx
jmp 0x40ce52
push ebx
push 1
lea eax, [ebp - 8]
push 2
push eax
call esi
mov ax, word [ebp - 8]
mov ecx, dword [ebp - 0x10]
push ebx
movsx edx, ax
push 1
mov word [ecx + 0x468d08], ax
mov eax, dword [0x468ec0]
mov ecx, dword [ebp - 0x20]
push 4
push 0x472ac0
mov dword [ecx + eax + 4], edx
call esi
push 4
push str.__K_
push 0x472ac0
call edi
add esp, 0x2c
test eax, eax
je 0x40c973
mov edx, dword [ebp + 8]
push str.Stata___K_
inc edx
push edx
jmp 0x40ce52
push ebx
push 1
push 3
push 0x472ac0
call esi
push 3
push 0x45fce8
push 0x472ac0
call edi
add esp, 0x1c
test eax, eax
je 0x40c9a3
mov eax, dword [ebp + 8]
push str.Stata__N_
inc eax
push eax
jmp 0x40ce52
mov ecx, dword [ebp - 0x10]
cmp dword [ecx + 0x468d18], 0xd
push ebx
push 1
je 0x40c9bf
lea edx, [ebp - 0x28]
push 8
push edx
call esi
mov eax, dword [ebp - 0x28]
jmp 0x40c9ca
lea edx, [ebp - 0x14]
push 4
push edx
call esi
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
add esp, 0x10
push ebx
push 1
push 4
push 0x472ac0
mov dword [ecx + 0x468d00], eax
call esi
push 4
push str.__N_
push 0x472ac0
call edi
add esp, 0x1c
test eax, eax
je 0x40ca06
mov edx, dword [ebp + 8]
push str.Stata___N_
inc edx
push edx
jmp 0x40ce52
push ebx
push 1
push 7
push 0x472ac0
call esi
push 7
push str._label_
push 0x472ac0
call edi
add esp, 0x1c
test eax, eax
je 0x40ca36
mov eax, dword [ebp + 8]
push str.Stata__label_
inc eax
push eax
jmp 0x40ce52
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx + 0x468d18]
sub eax, 0xd
je 0x40ca6c
dec eax
jne 0x40ca7a
push ebx
push 1
lea edx, [ebp - 0xc]
push 2
push edx
call esi
mov ax, word [ebp - 0xc]
add esp, 0x10
test ax, ax
jne 0x40ca63
mov byte [ebp - 3], al
jmp 0x40ca7a
add al, al
add al, al
mov byte [ebp - 3], al
jmp 0x40ca7a
push ebx
push 1
lea eax, [ebp - 3]
push 1
push eax
call esi
add esp, 0x10
movzx eax, byte [ebp - 3]
cdq
push 1
push edx
push eax
push ebx
call dword [sym.imp.MSVCR100.dll__fseeki64]
push ebx
push 1
push 8
push 0x472ac0
call esi
push 8
push str.__label_
push 0x472ac0
call edi
add esp, 0x2c
test eax, eax
je 0x40cab5
push str.Stata___label_
jmp 0x40ce4d
push ebx
push 1
push 0xb
push 0x472ac0
call esi
push 0xb
push str._timestamp_
push 0x472ac0
call edi
add esp, 0x1c
test eax, eax
je 0x40cae5
mov edx, dword [ebp + 8]
push str.Stata___timestamp_
inc edx
push edx
jmp 0x40ce52
push ebx
push 1
lea eax, [ebp - 3]
push 1
push eax
call esi
movzx eax, byte [ebp - 3]
cdq
push 1
push edx
push eax
push ebx
call dword [sym.imp.MSVCR100.dll__fseeki64]
push ebx
push 1
push 0x15
push 0x472ac0
call esi
push 0x15
push str.__timestamp___header_
push 0x472ac0
call edi
add esp, 0x3c
test eax, eax
je 0x40cb2b
push str.Stata___timestamp_
jmp 0x40ce4d
push ebx
push 1
push 5
push 0x472ac0
call esi
push 5
push str._map_
push 0x472ac0
call edi
add esp, 0x1c
test eax, eax
je 0x40cb5b
mov edx, dword [ebp + 8]
push str.Stata__map_
inc edx
push edx
jmp 0x40ce52
mov eax, dword [ebp - 0x10]
push ebx
push 1
lea ecx, [eax + 0x468d20]
push 0x70
push ecx
call esi
push ebx
push 1
push 6
push 0x472ac0
call esi
push 6
push str.__map_
push 0x472ac0
call edi
add esp, 0x2c
test eax, eax
je 0x40cb9c
mov edx, dword [ebp + 8]
push str.Stata___map_
inc edx
push edx
jmp 0x40ce52
push ebx
push 1
push 0x10
push 0x472ac0
call esi
push 0x10
push str._variable_types_
push 0x472ac0
call edi
add esp, 0x1c
test eax, eax
je 0x40cbcc
mov eax, dword [ebp + 8]
push str.Stata__vartype_
inc eax
push eax
jmp 0x40ce52
mov ecx, dword [ebp - 0x10]
movsx eax, word [ecx + 0x468d08]
lea edi, [eax + eax]
mov dword [ebp - 0x18], eax
call fcn.00409ea0
mov edi, dword [ebp - 0x18]
mov edx, dword [ebp - 0x10]
add edi, edi
add edi, edi
mov dword [edx + 0x468d10], eax
call fcn.00409ea0
mov edx, dword [ebp - 0x10]
mov dword [edx + 0x468d14], eax
mov eax, dword [ebp - 0x18]
mov edx, dword [edx + 0x468d10]
mov ecx, ebx
add eax, eax
call fcn.00409190
push ebx
push 1
push 0x11
push 0x472ac0
call esi
push 0x11
push str.__variable_types_
push 0x472ac0
call dword [sym.imp.MSVCR100.dll__strnicmp]
add esp, 0x1c
test eax, eax
je 0x40cc45
mov eax, dword [ebp + 8]
push str.Stata___vartype_
inc eax
push eax
jmp 0x40ce52
mov eax, dword [ebp - 0x18]
mov edi, eax
shl edi, 5
add edi, eax
call fcn.00409ea0
mov edi, dword [ebp - 0x10]
push ebx
push 1
push 0xa
push 0x472ac0
mov dword [edi + 0x468d1c], eax
call esi
push 0xa
push str._varnames_
push 0x472ac0
call dword [sym.imp.MSVCR100.dll__strnicmp]
add esp, 0x1c
test eax, eax
je 0x40cc8c
push str.Stata__varnames_
jmp 0x40ce4d
mov eax, dword [edi + 0x468d18]
sub eax, 0xd
mov edx, dword [edi + 0x468d1c]
mov dword [ebp - 0x20], edx
je 0x40cd59
dec eax
jne 0x40cd25
mov edi, dword [ebp - 0x18]
imul edi, dword [ebp - 0x1c]
call fcn.00409ea0
mov edx, eax
mov ecx, ebx
mov eax, edi
mov dword [ebp - 0x18], edx
call fcn.00409190
mov ecx, dword [ebp - 0x10]
xor eax, eax
xor edx, edx
mov dword [ebp - 0x14], eax
cmp dx, word [ecx + 0x468d08]
jge 0x40cd11
mov edi, dword [sym.imp.MSVCR100.dll_strncpy]
lea ebx, [ebx]
mov edx, dword [ebp - 0x1c]
imul edx, eax
add edx, dword [ebp - 0x18]
mov ecx, eax
shl ecx, 5
add ecx, dword [ebp - 0x20]
push 0x21
push edx
add ecx, eax
push ecx
call edi
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
movsx ecx, word [edx + 0x468d08]
inc eax
add esp, 0xc
mov dword [ebp - 0x14], eax
cmp eax, ecx
jl 0x40cce0
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x40cd22
push eax
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
mov edi, dword [ebp - 0x10]
push ebx
push 1
push 0xb
push 0x472ac0
call esi
push 0xb
push str.__varnames_
push 0x472ac0
call dword [sym.imp.MSVCR100.dll__strnicmp]
add esp, 0x1c
test eax, eax
je 0x40cd70
mov edx, dword [ebp + 8]
push str.Stata___varnames_
inc edx
push edx
jmp 0x40ce52
movsx ecx, word [edi + 0x468d08]
mov eax, ecx
shl eax, 5
add eax, ecx
mov ecx, ebx
call fcn.00409190
jmp 0x40cd25
xor eax, eax
mov dword [ebp - 0x1c], 0
cmp ax, word [edi + 0x468d08]
jge 0x40cde1
mov esi, dword [ebp - 0x20]
mov eax, esi
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40cd90
sub eax, edx
mov dword [ebp - 0x14], eax
cmp eax, 0x21
jge 0x40cdb7
mov edx, 0x21
sub edx, eax
push edx
lea ecx, [esi + eax]
push 0
push ecx
call sub.MSVCR100.dll_memset
add esp, 0xc
mov eax, 8
call fcn.00409670
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x1c]
movsx edx, word [ecx + 0x468d08]
inc eax
add esi, 0x21
mov dword [ebp - 0x1c], eax
cmp eax, edx
jl 0x40cd85
mov esi, dword [sym.imp.MSVCR100.dll_fread]
mov edi, ecx
mov eax, dword [edi + 0x468d68]
cdq
push 0
push edx
push eax
push ebx
call dword [sym.imp.MSVCR100.dll__fseeki64]
push ebx
push 1
push 6
push 0x472ac0
call esi
push 6
push str._data_
push 0x472ac0
call dword [sym.imp.MSVCR100.dll__strnicmp]
add esp, 0x2c
test eax, eax
je 0x40ce24
mov eax, dword [ebp + 8]
push str.Stata__data_
inc eax
push eax
jmp 0x40ce52
push ebx
call dword [sym.imp.MSVCR100.dll__ftelli64]
mov ecx, dword [ebp + 8]
add esp, 4
mov dword [ecx*8 + 0x468aa0], eax
mov dword [ecx*8 + 0x468aa4], edx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Stata__byteorder_
mov ecx, dword [ebp + 8]
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
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret