Function at 0x4076f0
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov edx, dword [esp + 0x30]
mov dword [esp + 0x14], 0
mov ebp, dword [esp + 0x48]
cmp dword [esp + 0x14], edx
jae 0x40785a
jmp 0x407720
mov eax, dword [esp + 0x34]
mov ebx, dword [esp + 0x14]
inc dword [eax]
shl ebx, 5
lea edx, [ebx + 0x4284b4]
mov dword [0x428cb4], edx
mov esi, dword [0x438cf0]
mov ecx, dword [ebx + 0x4284b4]
add esi, ecx
test esi, esi
mov eax, esi
js 0x408516
and eax, 0xffffe000
mov ebx, esi
sub ebx, eax
mov edi, esi
sub edi, ebx
test esi, esi
js 0x408410
cmp edi, dword [0x438cec]
je 0x4083e8
mov dword [esp + 0xc], 0
mov ecx, dword [0x438ce4]
mov eax, edi
mov dword [esp + 4], edi
sar eax, 0x1f
mov dword [esp + 8], eax
mov dword [esp], ecx
call sub.msvcrt.dll__lseeki64
mov dword [0x438cec], eax
mov edx, dword [0x438cc0]
mov ecx, dword [0x438ce4]
mov dword [esp + 8], 0x2000
mov dword [esp + 4], edx
mov dword [esp], ecx
call sub.msvcrt.dll__read
mov dword [0x438cc8], eax
test eax, eax
mov edx, eax
jle 0x4083d7
mov edi, dword [0x438cc0]
sub edx, ebx
mov dword [0x438cc8], edx
add edi, ebx
mov dword [0x438cc4], edi
mov dword [esp + 4], 4
mov dword [esp], 0x4284a4
call fcn.0040a230
test eax, eax
jne 0x407864
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0x4076c9
mov ebp, dword [esp + 0x34]
mov eax, dword [ebp]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x405d90
mov dword [esp], 0x428cb8
call sub.msvcrt.dll_sprintf
mov dword [esp + 0xc], 0x401
mov dword [esp + 8], eax
mov dword [esp + 4], 0x428cb8
mov dword [esp], 0x4283f0
call dword [0x439258]
mov ebp, 3
inc dword [esp + 0x14]
mov esi, dword [esp + 0x30]
cmp dword [esp + 0x14], esi
jb 0x407720
add esp, 0x1c
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], 4
mov dword [esp + 4], 0x427054
mov dword [esp], 0x4284a4
call sub.msvcrt.dll_strncmp
test eax, eax
je 0x4079d0
mov dword [esp + 0x10], esi
mov eax, dword [esp + 0x34]
mov dword [esp + 0xc], 0x405e57
mov ebp, dword [eax]
mov dword [esp + 4], 0x405d90
mov dword [esp], 0x428cb8
mov dword [esp + 8], ebp
mov ebp, 2
call sub.msvcrt.dll_sprintf
mov dword [esp + 8], eax
mov dword [esp + 0xc], 0x401
mov dword [esp + 4], 0x428cb8
mov dword [esp], 0x4283f0
call dword [0x439258]
mov ebx, dword [esp + 0x34]
cmp dword [ebx], 1
je 0x4083c4
mov ecx, dword [0x438cf0]
test ecx, ecx
jne case.0x407d7f.110
mov ebx, dword [esp + 0x3c]
mov edx, dword [ebx]
test edx, edx
je case.0x407d7f.110
mov dword [esp + 4], 0x405e90
mov dword [esp], 0x428cb8
call sub.msvcrt.dll_sprintf
mov dword [esp + 8], eax
mov dword [esp + 0xc], 0x401
mov dword [esp + 4], 0x428cb8
mov dword [esp], 0x4283f0
call dword [0x439258]
mov eax, dword [0x438cf0]
test eax, eax
je 0x4083b3
mov edi, dword [esp + 0x3c]
mov dword [edi], eax
xor eax, eax
mov dword [0x438cf0], eax
mov edi, dword [0x428cb4]
mov ecx, dword [edi]
mov dword [esp], ecx
call fcn.0040bb20
test eax, eax
mov ebx, eax
je 0x407986
cmp ebx, 3
je 0x407843
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0x4076c9
mov esi, dword [esp + 0x34]
mov eax, dword [esi]
jmp 0x40780a
mov dword [esp + 4], 4
mov dword [esp], 0x4284a4
call fcn.0040a230
test eax, eax
je 0x407966
mov dword [esp + 8], 4
mov dword [esp + 4], 0x427054
mov dword [esp], 0x4284a4
call sub.msvcrt.dll_strncmp
test eax, eax
jne 0x4083a2
lea esi, [esi]
lea edi, [edi]
call fcn.00411910
test eax, eax
mov ebx, eax
je 0x407a21
mov eax, dword [esp + 0x34]
mov ebp, ebx
mov ecx, dword [eax]
mov dword [esp + 4], 0x405e68
mov dword [esp], 0x428cb8
mov dword [esp + 8], ecx
call sub.msvcrt.dll_sprintf
mov dword [esp + 8], eax
mov dword [esp + 0xc], 0x421
mov dword [esp + 4], 0x428cb8
mov dword [esp], 0x4283f0
call dword [0x439258]
jmp case.0x407d7f.110
movzx edx, word [0x438d14]
mov dword [esp + 4], 6
mov dword [esp], edx
call fcn.0040b300
test eax, eax
mov ebx, eax
je 0x407a4b
cmp eax, ebp
jle 0x407a44
mov ebp, eax
dec ebx
jg 0x408375
mov eax, dword [0x428cb4]
mov ebx, dword [eax + 0x1c]
test ebx, ebx
jne 0x4082a4
cmp word [0x438d00], 0
jne 0x407aec
mov edx, dword [0x438d0c]
cmp dword [0x438d10], edx
je 0x407aec
mov dword [esp + 4], 0x430cb8
mov dword [esp], 0x438df8
call fcn.00409b40
mov dword [esp + 8], eax
mov ecx, dword [0x438d0c]
mov esi, dword [0x438d10]
mov dword [esp + 4], 0x405cf0
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], esi
mov dword [esp], 0x428cb8
call sub.msvcrt.dll_sprintf
mov dword [esp + 8], eax
mov dword [esp + 0xc], 0x401
mov dword [esp + 4], 0x428cb8
mov dword [esp], 0x4283f0
call dword [0x439258]
mov ebx, dword [0x438d0c]
test ebp, ebp
mov dword [0x438d10], ebx
jle 0x40829a
mov eax, dword [0x438cf4]
test eax, eax
jne 0x408285
movzx edx, word [0x438d16]
mov dword [esp + 4], 3
mov dword [esp], edx
call fcn.0040b300
test eax, eax
mov ebx, eax
je 0x407b23
cmp eax, ebp
jle 0x407b1c
mov ebp, eax
dec ebx
jg 0x408258
mov ebx, dword [0x428cb4]
test byte [ebx + 0x18], 1
jne 0x4081a2
mov edi, dword [0x428438]
test edi, edi
jne 0x407f50
mov edx, dword [0x428404]
test edx, edx
jne 0x407f50
xor esi, esi
mov ebx, dword [0x428cb4]
cmp byte [ebx + 0x13], 0
je 0x4080e9
test esi, esi
jne 0x407b72
cmp byte [0x438df8], 0x2f
je 0x408068
mov dword [esp], esi
call fcn.00418ed0
mov ebx, eax
and eax, 0xffff80ff
je 0x407b89
cmp ebp, eax
jge 0x407b89
mov ebp, eax
mov eax, ebx
and eax, 0x7f00
cmp eax, 0x100
jle 0x407c96
cmp eax, 0x1000
je 0x407c1e
cmp eax, 0x1100
je 0x407bc7
cmp eax, 0x200
jle case.0x407d7f.110
cmp ebp, 1
jg case.0x407d7f.110
mov ebp, 2
jmp case.0x407d7f.110
mov dword [esp + 4], 0x430cb8
mov dword [esp], 0x438df8
call fcn.00409b40
mov esi, dword [0x428434]
test esi, esi
je 0x407c17
mov edx, 0x4076cd
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], 0x405f50
mov dword [esp], 0x428cb8
call sub.msvcrt.dll_sprintf
mov dword [esp + 0xc], 0x401
mov dword [esp + 8], eax
jmp 0x407a07
mov edx, 0x4067b3
jmp 0x407bea
lea esi, [esp + 0x18]
mov dword [esp], esi
call fcn.00418380
mov edx, dword [esp + 0x18]
test edx, edx
jne 0x407c81
test eax, eax
je case.0x407d7f.110
mov dword [esp + 4], 0x405f90
mov dword [esp], 0x428cb8
call sub.msvcrt.dll_sprintf
mov dword [esp + 8], eax
mov dword [esp + 0xc], 0x401
mov dword [esp + 4], 0x428cb8
mov dword [esp], 0x4283f0
call dword [0x439258]
test ebp, ebp
jne case.0x407d7f.110
mov ebp, 1
jmp case.0x407d7f.110
mov edi, dword [esp + 0x40]
mov ebx, dword [esp + 0x44]
inc dword [edi]
mov ecx, dword [ebx]
mov dword [edx], ecx
mov dword [ebx], edx
jmp case.0x407d7f.110
mov dword [esp], 0x438df8
call fcn.0040be10
test eax, eax
je 0x408040
test eax, eax
jle 0x40801c
dec eax
jne 0x407f50
mov eax, dword [0x428400]
test eax, eax
jne 0x407ccf
cmp dword [0x42847c], 2
je case.0x407d7f.110
mov edi, dword [0x428440]
test edi, edi
je 0x407ce1
test esi, esi
je case.0x407d7f.110
cmp dword [0x42847c], 1
je 0x407f50
test eax, eax
jne 0x407f50
mov dword [esp + 4], 0x430cb8
mov dword [esp], 0x438df8
call fcn.00409b40
mov dword [esp + 8], eax
mov dword [esp + 4], 0x406070
mov dword [esp], 0x428cb8
call sub.msvcrt.dll_sprintf
mov dword [esp + 8], eax
mov dword [esp + 0xc], 0x81
mov dword [esp + 4], 0x428cb8
mov dword [esp], 0x4283f0
call dword [0x439258]
mov dword [esp + 4], 9
mov ebx, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], 0x4284a8
mov dword [esp + 8], ebx
call sub.msvcrt.dll_fgets
test eax, eax
je 0x407fce
movzx edx, byte [0x4284a8]
movsx eax, dl
sub eax, 0x41
cmp eax, 0x38
ja case.0x407d7f.66
jmp dword [eax*4 + 0x407d88]
mov dword [esp + 4], 0x4060bc
mov ebx, 0x438df8
mov dword [esp], 0x428cb8
call sub.msvcrt.dll_sprintf
mov dword [esp + 8], eax
mov dword [esp + 0xc], 0x81
mov dword [esp + 4], 0x428cb8
mov dword [esp], 0x4283f0
call dword [0x439258]
mov dword [esp + 4], 0x400
mov ecx, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], 0x438df8
mov dword [esp + 8], ecx
call sub.msvcrt.dll_fgets
mov esi, dword [ebx]
add ebx, 4
lea edx, [esi - 0x1010101]
not esi
and edx, esi
and edx, 0x80808080
je 0x407ec4
test edx, 0x8080
jne 0x407ee9
shr edx, 0x10
add ebx, 2
mov dword [esp], 0x438df8
add dl, dl
sbb ebx, 3
sub ebx, 0x438df8
mov dword [esp + 4], ebx
call fcn.0040bec0
cmp byte [eax], 0xa
je 0x407f32
test ebx, ebx
je case.0x407d7f.82
mov dword [esp + 4], 0x438df8
mov esi, 1
mov dword [esp], 0x438df8
call sub.USER32.dll_OemToCharA
sub esp, 8
jmp 0x407b51
dec ebx
mov byte [ebx + 0x438df8], 0
jmp 0x407f09
mov eax, 1
mov dword [0x42847c], eax
xor ebx, ebx
test ebx, ebx
jne case.0x407d7f.110
xor ecx, ecx
mov dword [0x438dc8], ecx
call fcn.00408580
test eax, eax
je case.0x407d7f.110
cmp eax, ebp
jle 0x407f6b
mov ebp, eax
cmp dword [0x438dc8], 1
jle case.0x407d7f.110
jmp 0x40785a
mov edx, 2
mov dword [0x42847c], edx
jmp case.0x407d7f.110
mov dword [esp + 4], 0x4060d0
movsx edi, dl
mov dword [esp + 8], edi
mov dword [esp], 0x428cb8
call sub.msvcrt.dll_sprintf
mov dword [esp + 8], eax
mov dword [esp + 0xc], 1
mov dword [esp + 4], 0x428cb8
mov dword [esp], 0x4283f0
call dword [0x439258]
jmp 0x407cf6
mov dword [esp + 4], 0x4060a3
mov dword [esp], 0x428cb8
call sub.msvcrt.dll_sprintf
mov dword [esp + 8], eax
mov dword [esp + 0xc], 1
mov dword [esp + 4], 0x428cb8
mov dword [esp], 0x4283f0
call dword [0x439258]
mov byte [0x4284a8], 0x4e
test ebp, ebp
jne 0x407d69
mov ebp, 1
jmp 0x407d69
inc eax
jne 0x407f50
mov eax, dword [0x42840c]
test eax, eax
je 0x407f50
test esi, esi
jne 0x407f50
jmp case.0x407d7f.110
mov edx, dword [0x428400]
test edx, edx
jne 0x407f50
mov eax, dword [0x42847c]
cmp eax, 2
je case.0x407d7f.110
dec eax
jne 0x407cf6
jmp 0x407f50
mov dword [esp + 4], 0x430cb8
mov dword [esp], 0x438df8
call fcn.00409b40
mov dword [esp + 8], eax
mov dword [esp + 4], 0x405f10
mov dword [esp], 0x428cb8
call sub.msvcrt.dll_sprintf
mov dword [esp + 8], eax
mov dword [esp + 0xc], 0x401
mov dword [esp + 4], 0x428cb8
mov dword [esp], 0x4283f0
call dword [0x439258]
test ebp, ebp
jne 0x4080be
mov ebp, 1
mov edx, 0x438df9
lea esi, [esi]
lea edi, [edi]
movzx ebx, byte [edx]
mov byte [edx - 1], bl
inc edx
test bl, bl
jne 0x4080d0
cmp byte [0x438df8], 0x2f
je 0x4080be
jmp 0x407b72
mov dword [esp + 4], 0x2f
mov dword [esp], 0x438df8
call fcn.0040bf20
test eax, eax
jne 0x407b61
movzx eax, byte [0x438df8]
mov ebx, 0x438df8
test al, al
je 0x407b61
cmp al, 0x5c
je 0x40813f
mov ecx, dword [sym.imp.msvcrt.dll___mb_cur_max]
mov edx, dword [ecx]
mov dword [esp], ebx
mov dword [esp + 4], edx
call sub.msvcrt.dll_mblen
add ebx, eax
movzx eax, byte [ebx]
test al, al
jne 0x408119
jmp 0x407b61
mov ecx, dword [0x438dc4]
test ecx, ecx
je 0x40814e
mov byte [ebx], 0x2f
jmp 0x40811d
mov dword [esp + 4], 0x405ed0
mov edi, dword [0x438ce0]
mov dword [esp], 0x428cb8
mov dword [esp + 8], edi
call sub.msvcrt.dll_sprintf
mov dword [esp + 8], eax
mov dword [esp + 0xc], 0x21
mov dword [esp + 4], 0x428cb8
mov dword [esp], 0x4283f0
call dword [0x439258]
mov eax, 1
test ebp, ebp
mov dword [0x438dc4], eax
jne 0x408149
mov ebp, 1
jmp 0x408149
mov esi, dword [0x4283f4]
mov dword [esp], esi
call fcn.00403d00
test eax, eax
je 0x407b33
cmp eax, 1
je 0x4081f4
cmp eax, ebp
jle 0x4081c3
mov ebp, eax
mov dword [esp + 4], 0x430cb8
mov dword [esp], 0x438df8
call fcn.00409b40
mov dword [esp + 8], eax
mov dword [esp + 4], 0x4061b0
mov dword [esp], 0x428cb8
call sub.msvcrt.dll_sprintf
jmp 0x407c06
mov ecx, dword [0x42842c]
test ecx, ecx
je 0x408209
mov eax, dword [esp + 0x38]
inc dword [eax]
jmp case.0x407d7f.110
mov dword [esp + 4], 0x430cb8
mov dword [esp], 0x438df8
call fcn.00409b40
mov dword [esp + 8], eax
mov dword [esp + 4], 0x4061f0
mov dword [esp], 0x428cb8
call sub.msvcrt.dll_sprintf
mov dword [esp + 8], eax
mov dword [esp + 0xc], 0x401
mov dword [esp + 4], 0x428cb8
mov dword [esp], 0x4283f0
call dword [0x439258]
jmp 0x4081fe
mov dword [esp + 4], 0x430cb8
mov dword [esp], 0x438df8
call fcn.00409b40
mov dword [esp + 8], eax
mov dword [esp + 0xc], 0x4076d8
mov dword [esp + 4], 0x405d50
jmp 0x407bfa
mov dword [esp], eax
xor edi, edi
call sub.msvcrt.dll_free
mov dword [0x438cf4], edi
jmp 0x407af9
mov ebp, 1
jmp 0x407aec
mov dword [esp + 4], 0x438df8
mov edi, dword [eax + 0x1c]
mov dword [esp], edi
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x4082de
mov edi, dword [0x428cb4]
mov ecx, dword [edi + 0x1c]
mov dword [esp], ecx
call sub.msvcrt.dll_free
mov esi, dword [0x428cb4]
mov dword [esi + 0x1c], 0
jmp 0x407a5b
mov dword [esp + 4], 0x430cb8
mov dword [esp], 0x438df8
call fcn.00409b40
mov dword [esp + 4], 0x434cb8
mov ebx, dword [0x428cb4]
mov edi, eax
mov edx, dword [ebx + 0x1c]
mov dword [esp], edx
call fcn.00409b40
mov dword [esp + 8], eax
mov dword [esp + 0xc], edi
mov dword [esp + 4], 0x405c90
mov dword [esp], 0x428cb8
call sub.msvcrt.dll_sprintf
mov dword [esp + 8], eax
mov dword [esp + 0xc], 0x401
mov dword [esp + 4], 0x428cb8
mov dword [esp], 0x4283f0
call dword [0x439258]
mov ecx, dword [0x428cb4]
mov esi, dword [ecx + 0x1c]
mov dword [esp], 0x438df8
mov dword [esp + 4], esi
call sub.msvcrt.dll_strcpy
test ebp, ebp
jg 0x4082bb
mov ebp, 1
jmp 0x4082bb
mov dword [esp + 4], 0x430cb8
mov dword [esp], 0x438df8
call fcn.00409b40
mov dword [esp + 8], eax
mov dword [esp + 0xc], 0x4076d8
mov dword [esp + 4], 0x405c30
jmp 0x407bfa
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0x405e57
jmp 0x407803
mov ebx, dword [esp + 0x3c]
mov edx, dword [ebx]
mov dword [0x438cf0], edx
jmp 0x407950
mov edi, dword [0x438cf0]
test edi, edi
jne 0x407901
jmp 0x4078f3
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], 0x4076de
jmp 0x40797b
mov edx, dword [0x438cc4]
mov ecx, dword [0x438cc0]
sub edx, ecx
sub edx, ebx
add ecx, ebx
add dword [0x438cc8], edx
mov dword [0x438cc4], ecx
jmp 0x4077df
mov dword [esp + 0xc], 0x401470
mov edi, dword [0x438ce0]
mov ebp, 2
mov dword [esp + 4], 0x4013b0
mov dword [esp], 0x428cb8
mov dword [esp + 8], edi
call sub.msvcrt.dll_sprintf
mov dword [esp + 8], eax
mov dword [esp + 0xc], 0x401
mov dword [esp + 4], 0x428cb8
mov dword [esp], 0x4283f0
call dword [0x439258]
mov esi, dword [esp + 0x34]
cmp dword [esi], 1
jne 0x407843
mov ecx, dword [0x438cf0]
test ecx, ecx
je 0x407843
mov dword [esp + 4], 0x405e90
mov dword [esp], 0x428cb8
call sub.msvcrt.dll_sprintf
mov dword [esp + 8], eax
mov dword [esp + 0xc], 0x401
mov dword [esp + 4], 0x428cb8
mov dword [esp], 0x4283f0
call dword [0x439258]
mov edi, dword [0x438cf0]
xor edx, edx
mov esi, dword [esp + 0x3c]
mov ebx, dword [0x428cb4]
mov dword [esi], edi
mov dword [0x438cf0], edx
mov esi, dword [ebx]
test esi, esi
mov eax, esi
js 0x40850e
and eax, 0xffffe000
mov ebx, esi
sub ebx, eax
mov edi, esi
sub edi, ebx
test esi, esi
jns 0x407766
mov dword [esp + 0xc], 0x401470
mov ebp, dword [0x438ce0]
mov dword [esp + 4], 0x4013b0
mov dword [esp], 0x428cb8
mov dword [esp + 8], ebp
call sub.msvcrt.dll_sprintf
jmp 0x407822
lea eax, [esi + 0x1fff]
jmp 0x4084ce
lea eax, [esi + 0x1fff]
jmp 0x407751