Function at 0x407744
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1294
call fcn.0042b680
mov al, byte [0x451740]
push ebx
push esi
mov edx, ecx
push edi
mov byte [ebp - 0x1294], al
mov ecx, 0x3ff
xor eax, eax
lea edi, [ebp - 0x1293]
push 1
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
and byte [ebp - 5], 0
pop ebx
stosb byte es:[edi], al
lea eax, [ebp - 0x294]
add edx, 0x9c
push eax
push edx
push dword [ebp + 8]
xor esi, esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x1c], edx
call fcn.00407697
add esp, 0xc
lea eax, [ebp - 0x294]
push esi
push esi
push 3
push esi
push ebx
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x30], eax
jne 0x40780d
cmp word [ebp + 0x18], si
je 0x4077d2
xor ax, ax
jmp 0x407e33
mov esi, 0x1000
lea eax, [ebp - 0x1294]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00424a92
add esp, 0xc
push eax
lea eax, [ebp - 0x294]
push eax
push esi
push dword [ebp + 0x14]
push ebx
push 0x454168
call fcn.00420804
add esp, 0x18
jmp 0x407e2f
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
jne 0x407838
lea eax, [ebp - 0x294]
push eax
push str.Error_reading_size_of_defaults_file__s
push dword [ebp + 0x14]
call fcn.0042b964
add esp, 0xc
jmp 0x407dde
lea eax, [edi + 1]
push eax
call fcn.0042b798
mov ebx, eax
lea eax, [edi + 1]
push eax
mov dword [ebp - 0x20], ebx
call fcn.0042b798
pop ecx
cmp ebx, esi
pop ecx
mov dword [ebp - 0x10], eax
je 0x407dcf
cmp eax, esi
je 0x407dcf
lea eax, [ebp - 0x38]
push esi
push eax
push edi
push ebx
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x407dbe
cmp edi, dword [ebp - 0x38]
jne 0x407dbe
and byte [edi + ebx], 0
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x28]
push dword [ebp - 0x10]
mov dword [ebp - 0x28], ebx
push eax
call fcn.00407e3a
add esp, 0xc
test ax, ax
jne 0x407c2f
mov bl, byte [ebp - 0xc]
jmp 0x4078af
xor esi, esi
mov eax, dword [ebp - 0x10]
mov edi, dword [ebp + 0x10]
mov dword [ebp + 8], eax
cmp dword [edi], esi
je 0x4078d5
push esi
lea eax, [ebp + 8]
push dword [edi]
push eax
call fcn.004076d8
add esp, 0xc
test ax, ax
jne 0x4078f0
add edi, 0x18
jmp 0x4078b8
mov eax, dword [ebp + 8]
cmp byte [eax], 0x5b
jne 0x4078e1
mov byte [ebp - 5], 1
cmp byte [ebp - 5], 0
je 0x407c37
jmp 0x407c11
mov ax, word [edi + 4]
cmp ax, 4
jne 0x40790f
mov eax, dword [ebp + 8]
cmp byte [eax], 0
jne 0x407c80
and byte [ebp - 5], 0
jmp 0x407c11
cmp byte [ebp - 5], 0
jne 0x407c11
mov ecx, dword [ebp + 8]
cmp byte [ecx], 0x3d
jne 0x407c89
inc ecx
mov dword [ebp + 8], ecx
cmp byte [ecx], 0
jne 0x407938
cmp ax, 1
jne 0x407c11
movzx esi, word [edi + 6]
add esi, dword [ebp + 0xc]
movzx eax, ax
sub eax, 0
je 0x407af1
dec eax
je 0x407a85
dec eax
je 0x4079c1
dec eax
jne 0x407c11
and word [esi], 0
and dword [ebp - 0x14], 0
mov eax, dword [edi + 0x14]
mov dword [ebp - 4], eax
mov eax, dword [eax]
test eax, eax
je 0x407ca3
push 0
push eax
lea eax, [ebp + 8]
push eax
call fcn.004076d8
add esp, 0xc
test ax, ax
jne 0x407991
add dword [ebp - 4], 6
mov eax, dword [ebp - 4]
jmp 0x40796a
mov eax, dword [ebp - 4]
mov ax, word [eax + 4]
or word [esi], ax
mov eax, dword [ebp + 8]
cmp byte [eax], 0x2c
jne 0x4079b3
test byte [edi + 0x12], 1
je 0x407d35
inc eax
mov dword [ebp + 8], eax
jmp 0x407964
cmp byte [eax], 0
jne 0x407c92
jmp 0x407c11
push ecx
call fcn.0042bfb0
cmp eax, dword [edi + 0xc]
pop ecx
ja 0x407d41
mov eax, dword [ebp + 8]
mov cl, byte [eax]
cmp cl, 0x5c
jne 0x4079ed
mov eax, dword [ebp - 0x1c]
mov ax, word [eax]
mov word [esi], ax
push dword [ebp + 8]
lea eax, [esi + 2]
push eax
jmp 0x4079ff
test cl, cl
je 0x407a21
cmp byte [eax + 1], 0x3a
jne 0x407a21
cmp byte [eax + 2], 0x5c
jne 0x407a08
push eax
push esi
call fcn.0042b1f0
pop ecx
pop ecx
jmp 0x407a36
push dword [ebp - 0x1c]
push esi
call fcn.0042b1f0
mov eax, dword [ebp + 8]
mov al, byte [eax]
mov byte [esi], al
mov eax, dword [ebp + 8]
add eax, 2
push eax
jmp 0x407a2d
push dword [ebp - 0x1c]
push esi
call fcn.0042b1f0
push dword [ebp + 8]
push esi
call fcn.0042b200
add esp, 0x10
mov bl, byte [esi]
xor eax, eax
test bl, bl
mov dword [ebp - 4], eax
mov byte [ebp - 0xc], bl
je 0x407a67
push dword [ebp - 0xc]
mov byte [ebp + 0x1b], bl
call dword [sym.imp.KERNEL32.dll_IsDBCSLeadByte]
test eax, eax
je 0x407a57
inc dword [ebp - 4]
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
mov bl, byte [eax + esi]
test bl, bl
mov byte [ebp - 0xc], bl
jne 0x407a44
cmp byte [ebp + 0x1b], 0x5c
je 0x407a76
mov byte [eax + esi], 0x5c
inc eax
and byte [eax + esi], 0
mov ecx, dword [edi + 8]
mov edx, dword [ebp + 0xc]
mov word [ecx + edx], ax
jmp 0x407c11
push ecx
call fcn.0042bfb0
cmp eax, dword [edi + 0xc]
pop ecx
ja 0x407d4d
test byte [edi + 0x12], 1
je 0x407ae1
xor edi, edi
mov eax, dword [ebp + 8]
mov bl, byte [eax]
inc dword [ebp + 8]
test di, di
mov byte [ebp - 0xc], bl
je 0x407ab1
xor edi, edi
jmp 0x407ad5
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsDBCSLeadByte]
test eax, eax
je 0x407ac3
push 1
pop edi
jmp 0x407ad5
cmp bl, 0x20
je 0x407a9d
cmp bl, 0x61
jb 0x407ad5
cmp bl, 0x7a
ja 0x407ad5
xor bl, 0x20
mov byte [esi], bl
inc esi
test bl, bl
jne 0x407a9d
jmp 0x407c11
push dword [ebp + 8]
push esi
call fcn.0042b1f0
pop ecx
pop ecx
jmp 0x407c11
movzx eax, word [edi + 0x10]
test eax, eax
mov dword [ebp - 0x14], eax
je 0x407c09
jmp 0x407b05
mov ecx, dword [ebp + 8]
mov bl, byte [ecx]
xor eax, eax
inc ecx
mov dword [ebp - 4], 0xa
test bl, bl
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x34], eax
mov dword [ebp + 8], ecx
je 0x407bd9
cmp bl, 0x2c
je 0x407bd0
cmp bl, 0x2b
je 0x407ba6
cmp bl, 0x2d
je 0x407ba6
cmp bl, 0x58
je 0x407b8d
cmp bl, 0x78
je 0x407b8d
cmp bl, 0x41
jb 0x407b49
cmp bl, 0x46
jbe 0x407b53
cmp bl, 0x61
jb 0x407b65
cmp bl, 0x66
ja 0x407b65
cmp dword [ebp - 4], 0x10
jne 0x407d59
or bl, 0x20
sub bl, 7
jmp 0x407b77
cmp bl, 0x30
jb 0x407d65
cmp bl, 0x39
ja 0x407d65
mov edx, dword [ebp - 4]
and ebx, 0xf
imul edx, eax
add edx, ebx
mov dword [ebp - 0x34], 1
mov eax, edx
jmp 0x407bc2
test eax, eax
jne 0x407d71
push 0x10
pop edx
cmp dword [ebp - 4], edx
je 0x407d71
mov dword [ebp - 4], edx
jmp 0x407bc2
cmp word [ebp - 0x34], 0
jne 0x407d7d
cmp bl, 0x2d
jne 0x407bc2
xor edx, edx
cmp word [ebp - 0x24], dx
sete dl
mov dword [ebp - 0x24], edx
mov bl, byte [ecx]
inc ecx
test bl, bl
mov dword [ebp + 8], ecx
jne 0x407b22
cmp word [ebp - 0x24], 0
je 0x407bd9
neg eax
cmp eax, dword [edi + 8]
jl 0x407d89
cmp eax, dword [edi + 0xc]
jg 0x407da4
test byte [edi + 0x12], 1
je 0x407bf6
lea eax, [eax + eax*4]
shl eax, 1
cmp bl, 0x2c
mov dword [esi], eax
jne 0x407c09
add esi, 4
dec dword [ebp - 0x14]
jne 0x407b02
test bl, bl
jne 0x407db0
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x28]
push dword [ebp - 0x10]
push eax
call fcn.00407e3a
add esp, 0xc
test ax, ax
je 0x4078ad
xor esi, esi
mov dword [ebp - 0x2c], esi
jmp 0x407dde
mov eax, dword [ebp + 8]
mov bl, byte [eax]
mov byte [ebp - 0xc], bl
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsDBCSLeadByte]
test eax, eax
je 0x407c51
inc dword [ebp + 8]
jmp 0x407c60
cmp bl, 0x20
jbe 0x407c66
cmp bl, 0x3d
je 0x407c66
cmp esi, 0x64
ja 0x407c66
inc dword [ebp + 8]
inc esi
jmp 0x407c37
mov eax, dword [ebp + 8]
push dword [ebp - 0x10]
and byte [eax], 0
push str.__s__is_not_a_recognised_parameter_name
lea eax, [ebp - 0x1294]
push eax
jmp 0x40782b
push dword [edi]
push str.Unexpected_text_after__s_section_name
jmp 0x407c74
push dword [edi]
push str.Expecting____after___s__parameter
jmp 0x407c74
push dword [edi]
mov eax, dword [ebp - 4]
push dword [eax]
push str.Unexpected_text_after___s__keyword_in___s__parameter
jmp 0x407d93
mov esi, dword [ebp + 8]
and dword [ebp - 4], 0
mov bl, byte [esi]
mov byte [ebp - 0xc], bl
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsDBCSLeadByte]
test eax, eax
je 0x407cbf
inc esi
jmp 0x407ccf
cmp bl, 0x20
jbe 0x407cd5
cmp bl, 0x3d
je 0x407cd5
cmp dword [ebp - 4], 0x64
ja 0x407cd5
inc esi
inc dword [ebp - 4]
jmp 0x407caa
and byte [esi], 0
push dword [edi]
lea eax, [ebp - 0x1294]
push dword [ebp + 8]
push str.__s__is_not_a_recognised_keyword_for_the___s__parameter_n_nRecognised_keywords_are:
push eax
call fcn.0042b964
mov edi, dword [edi + 0x14]
add esp, 0x10
cmp dword [edi], 0
je 0x407dde
cmp word [ebp - 0x14], 0
je 0x407d19
lea eax, [ebp - 0x1294]
push 0x43b3dc
push eax
call fcn.0042b200
pop ecx
pop ecx
jmp 0x407d20
mov dword [ebp - 0x14], 1
push dword [edi]
lea eax, [ebp - 0x1294]
push eax
call fcn.0042b200
pop ecx
add edi, 6
pop ecx
jmp 0x407cf4
push dword [edi]
push str.Multiple_keyword_settings_are_not_allowed_for__s_parameter
jmp 0x407c74
push dword [edi + 0xc]
push dword [edi]
push str.Path_string_too_long_in___s__parameter__maximum_length_allowed_is__u_characters_
jmp 0x407d93
push dword [edi + 0xc]
push dword [edi]
push str.String_too_long_in___s__parameter__maximum_length_allowed_is__u_characters_
jmp 0x407d93
push dword [edi]
push str.Invalid_numeric_value_in___s__parameter__please_prefix_hex_value_with__x__
jmp 0x407c74
push dword [edi]
push str.Invalid_numeric_value_in___s__parameter
jmp 0x407c74
push dword [edi]
push str.Invalid_hexadecimal_value_in___s__parameter
jmp 0x407c74
push dword [edi]
push str.Invalid_sign_character_in___s__parameter
jmp 0x407c74
push dword [edi + 8]
push dword [edi]
push str.Numeric_value_too_small_in___s__parameter__minimum_value_allowed_is__d_
lea eax, [ebp - 0x1294]
push eax
call fcn.0042b964
add esp, 0x10
jmp 0x407dde
push dword [edi + 0xc]
push dword [edi]
push str.Numeric_value_too_large_in___s__parameter__maximum_value_allowed_is__u_
jmp 0x407d93
movzx eax, word [edi + 0x10]
push eax
push dword [edi]
push str.Too_many_values_in___s__parameter__maximum_allowed_is__u_
jmp 0x407d93
lea eax, [ebp - 0x294]
push eax
push str.Error_reading_defaults_file__s
jmp 0x407828
push str.Cant_allocate_memory_to_read_defaults_file
push dword [ebp + 0x14]
call fcn.0042b1f0
pop ecx
pop ecx
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x20], 0
je 0x407df6
push dword [ebp - 0x20]
call fcn.0042b6af
pop ecx
cmp dword [ebp - 0x10], 0
je 0x407e05
push dword [ebp - 0x10]
call fcn.0042b6af
pop ecx
cmp byte [ebp - 0x1294], 0
je 0x407e2f
lea eax, [ebp - 0x1294]
push eax
lea eax, [ebp - 0x294]
push eax
push dword [ebp - 0x18]
push str.Defaults_file_error_in_line__u_of__s_n_n_s
push dword [ebp + 0x14]
call fcn.0042b964
add esp, 0x14
mov ax, word [ebp - 0x2c]
pop edi
pop esi
pop ebx
leave
ret 0x14