Function at 0x100512c0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0xca9c
call fcn.10203e10
mov eax, dword [0x105520d0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
push edi
push str.QLIB_FTM_NFC_ExecuteNciSequenceFile__sFileName___s__
push esi
mov dword [ebp - 0xca80], esi
mov dword [ebp - 0xca8c], edi
mov dword [ebp - 0xca70], ebx
mov dword [ebp - 0xca7c], eax
mov dword [ebp - 0xca78], ecx
call fcn.10122440
mov edx, dword [ebp - 0xca7c]
mov eax, dword [ebp - 0xca78]
mov byte [ebx], 0
mov dword [edx], 0
push esi
mov dword [eax], 0
call fcn.10136570
mov dword [ebp - 0xca88], eax
xor eax, eax
push 0x1021cb20
push edi
mov byte [ebp - 0xca69], 1
mov dword [ebp - 0xca98], eax
mov dword [ebp - 0xca94], eax
call dword [sym.imp.MSVCR100.dll_fopen]
mov edi, eax
add esp, 0x18
mov dword [ebp - 0xca84], edi
test edi, edi
je 0x10051cda
push edi
mov dword [ebp - 0xca68], 0
mov byte [ebp - 0xca6c], 0
mov byte [ebp - 0xca6b], 0
call dword [sym.imp.MSVCR100.dll_feof]
add esp, 4
test eax, eax
je 0x100513a9
push edi
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 4
jmp 0x10051d66
mov ebx, dword [ebp - 0xca70]
mov esi, dword [sym.imp.MSVCR100.dll_strncat]
push 0xc350
lea ecx, [ebp - 0xca60]
push 0
push ecx
mov byte [ebp - 0xca6a], 0
mov byte [ebp - 0xca61], 0
call sub.MSVCR100.dll_memset
add esp, 0xc
mov word [ebp - 0xca74], 0
lea esp, [esp]
push edi
push 1
lea edx, [ebp - 0xca74]
push 1
push edx
call dword [sym.imp.MSVCR100.dll_fread]
mov al, byte [ebp - 0xca74]
add esp, 0x10
cmp al, 0xd
je 0x10051434
cmp al, 0xa
je 0x10051434
test al, al
je 0x10051434
lea eax, [ebp - 0xca60]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10051410
sub eax, edx
mov ecx, 0xc34f
sub ecx, eax
push ecx
lea edx, [ebp - 0xca74]
push edx
lea eax, [ebp - 0xca60]
push eax
call esi
add esp, 0xc
push edi
call dword [sym.imp.MSVCR100.dll_feof]
add esp, 4
test eax, eax
jne 0x1005144b
cmp byte [ebp - 0xca74], 0xd
jne 0x100513e0
lea eax, [ebp - 0xca60]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10051454
inc dword [ebp - 0xca68]
sub eax, edx
mov edi, eax
test edi, edi
jle 0x10051845
mov al, byte [ebp - 0xca60]
cmp al, 0x23
je 0x10051845
cmp edi, 0xb
jl 0x10051872
cmp al, 0x3c
jne 0x100514c5
cmp byte [ebp - 0xca5f], al
jne 0x100516ab
cmp byte [ebp - 0xca5e], 0x20
jne 0x100516ab
cmp byte [ebp - 0xca5d], 0x32
jne 0x100516ab
push 0x102
push 0
lea ecx, [ebp - 0x508]
mov byte [ebp - 0xca6a], 1
push ecx
jmp 0x10051508
cmp al, 0x3e
jne 0x100516ab
cmp byte [ebp - 0xca5f], al
jne 0x100516ab
cmp byte [ebp - 0xca5e], 0x20
jne 0x100516ab
cmp byte [ebp - 0xca5d], 0x34
jne 0x100516ab
push 0x102
push 0
lea edx, [ebp - 0x60c]
mov byte [ebp - 0xca61], 1
push edx
call sub.MSVCR100.dll_memset
lea ecx, [edi - 2]
mov eax, 0x55555556
imul ecx
mov edi, edx
shr edi, 0x1f
add edi, edx
add esp, 0xc
cmp edi, 3
jl 0x1005193a
cmp edi, 0x102
jg 0x100519ba
mov dword [ebp - 0xca9c], 0
test edi, edi
jle 0x100515fb
lea esi, [ebp - 0xca5c]
mov edi, edi
movsx eax, byte [esi - 1]
push eax
call dword [sym.imp.MSVCR100.dll_toupper]
movsx ecx, byte [esi]
push ecx
mov bl, al
call dword [sym.imp.MSVCR100.dll_toupper]
lea edx, [ebx - 0x41]
add esp, 8
cmp dl, 5
ja 0x1005157a
movsx ecx, bl
sub ecx, 0x37
jmp 0x1005158c
lea ecx, [ebx - 0x30]
cmp cl, 9
ja 0x10051aea
movsx ecx, bl
sub ecx, 0x30
lea edx, [eax - 0x41]
cmp dl, 5
ja 0x1005159c
movsx eax, al
sub eax, 0x37
jmp 0x100515ae
lea edx, [eax - 0x30]
cmp dl, 9
ja 0x10051a58
movsx eax, al
sub eax, 0x30
cmp byte [ebp - 0xca6a], 0
je 0x100515ce
mov dl, cl
shl dl, 4
lea ebx, [eax + edx]
mov edx, dword [ebp - 0xca9c]
mov byte [ebp + edx - 0x508], bl
jmp 0x100515d4
mov edx, dword [ebp - 0xca9c]
cmp byte [ebp - 0xca61], 0
je 0x100515e9
shl cl, 4
add cl, al
mov byte [ebp + edx - 0x60c], cl
inc edx
add esi, 3
mov dword [ebp - 0xca9c], edx
cmp edx, edi
jl 0x10051550
mov cl, byte [ebp - 0xca6a]
xor al, al
test cl, cl
je 0x1005160f
mov al, byte [ebp - 0x506]
jmp 0x1005161e
cmp byte [ebp - 0xca61], 0
je 0x1005161e
mov al, byte [ebp - 0x60a]
movzx eax, al
lea edx, [edi - 3]
cmp eax, edx
jne 0x10051b7c
test cl, cl
je 0x1005169b
movzx ecx, di
lea eax, [ebp - 0xca60]
mov dword [ebp - 0xca98], ecx
mov byte [ebp - 0xca6c], 1
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10051648
mov edi, dword [ebp - 0xca70]
sub eax, ecx
mov edx, ecx
dec edi
lea ebx, [ebx]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10051660
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp - 0xca70]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
dec eax
nop
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x10051680
mov dx, word [0x102ab434]
mov word [eax], dx
mov cl, byte [0x102ab436]
mov byte [eax + 2], cl
cmp byte [ebp - 0xca61], 0
je 0x100516ab
mov byte [ebp - 0xca6b], 1
cmp byte [ebp - 0xca6c], 0
je 0x10051845
cmp byte [ebp - 0xca6b], 0
je 0x10051845
lea edx, [ebp - 0x710]
push edx
mov edx, dword [ebp - 0xca98]
lea eax, [ebp - 0xca94]
push eax
mov eax, dword [ebp - 0xca80]
lea ecx, [ebp - 0x508]
push ecx
push edx
push eax
call sym.QMSL_MSVC10R.dll_QLIB_FTM_NFC_NFCC_CMD_RSP
add esp, 0x14
and byte [ebp - 0xca69], al
je 0x10051c0e
xor eax, eax
xor ecx, ecx
xor edi, edi
mov byte [ebp - 0xca90], 0
mov word [ebp - 0xca8f], ax
mov byte [ebp - 0xca8d], al
mov byte [ebp - 0x404], al
cmp cx, word [ebp - 0xca94]
jae 0x10051786
mov esi, dword [sym.imp.MSVCR100.dll_strncat]
mov ebx, dword [sym.imp.MSVCR100.dll__snprintf]
movzx edx, byte [ebp + edi - 0x710]
push edx
push str._02X
lea eax, [ebp - 0xca90]
push 4
push eax
call ebx
lea eax, [ebp - 0x404]
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10051756
sub eax, edx
mov ecx, 0x3ff
sub ecx, eax
push ecx
lea edx, [ebp - 0xca90]
push edx
lea eax, [ebp - 0x404]
push eax
call esi
movzx ecx, word [ebp - 0xca94]
inc edi
add esp, 0xc
cmp edi, ecx
jl 0x10051731
mov esi, dword [ebp - 0xca70]
lea edi, [esi - 1]
nop
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x10051790
mov edx, dword [0x102ac6bc]
lea eax, [ebp - 0x404]
mov dword [edi], edx
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x100517a8
sub eax, ecx
mov edx, ecx
lea edi, [esi - 1]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x100517b6
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp - 0xca70]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x100517d5
mov cx, word [0x102ab434]
mov word [eax], cx
mov dl, byte [0x102ab436]
xor esi, esi
push 0x102
mov byte [eax + 2], dl
lea eax, [ebp - 0x508]
push esi
push eax
mov byte [ebp - 0xca6c], 0
mov byte [ebp - 0xca6b], 0
mov dword [ebp - 0xca98], esi
mov dword [ebp - 0xca94], esi
call sub.MSVCR100.dll_memset
push 0x102
lea ecx, [ebp - 0x710]
push esi
push ecx
call sub.MSVCR100.dll_memset
push 0x102
lea edx, [ebp - 0x60c]
push esi
push edx
call sub.MSVCR100.dll_memset
add esp, 0x24
mov edi, dword [ebp - 0xca84]
push edi
call dword [sym.imp.MSVCR100.dll_feof]
add esp, 4
test eax, eax
je 0x100513a3
mov esi, dword [ebp - 0xca80]
push edi
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 4
jmp 0x10051d66
mov eax, dword [ebp - 0xca8c]
mov ecx, dword [ebp - 0xca68]
push eax
push ecx
push str.Parsing_error_at_line__d_of_file__s._Line_too_short_for_3_bytes_min_payload._QLIB_FTM_NFC_ExecuteNciSequenceFile_function_aborted_
lea edx, [ebp - 0x404]
push 0x400
push edx
call dword [sym.imp.MSVCR100.dll__snprintf]
mov ecx, dword [ebp - 0xca88]
mov edx, dword [ecx + 0x18]
lea eax, [ebp - 0x404]
push eax
mov eax, dword [edx]
push 0x10
push eax
call fcn.10115e20
lea eax, [ebp - 0x404]
add esp, 0x20
mov ecx, eax
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x100518c0
sub eax, ecx
mov edx, ecx
lea edi, [ebx - 1]
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x100518d0
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 0xca84]
push ecx
call dword [sym.imp.MSVCR100.dll_fclose]
mov ecx, dword [ebp - 0xca7c]
mov dword [ecx], 3
mov eax, dword [ebp - 0xca68]
mov edx, dword [ebp - 0xca78]
push eax
mov dword [edx], eax
mov eax, dword [ecx]
mov ecx, dword [ebp - 0xca80]
push eax
push str.QLIB_FTM_NFC_ExecuteNciSequenceFile__piErrorCode___d__piErrorLineNum___d__
push ecx
call fcn.101224b0
add esp, 0x14
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10203cc8
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0xca8c]
mov eax, dword [ebp - 0xca68]
push edx
push eax
push str.Parsing_error_at_line__d_of_file__s._Number_of_bytes___3._QLIB_FTM_NFC_ExecuteNciSequenceFile_function_aborted_
lea ecx, [ebp - 0x404]
push 0x400
push ecx
call dword [sym.imp.MSVCR100.dll__snprintf]
mov eax, dword [ebp - 0xca88]
mov ecx, dword [eax + 0x18]
lea edx, [ebp - 0x404]
push edx
mov edx, dword [ecx]
push 0x10
push edx
call fcn.10115e20
lea eax, [ebp - 0x404]
add esp, 0x20
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10051984
mov edi, dword [ebp - 0xca70]
sub eax, ecx
mov edx, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10051996
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp - 0xca84]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push eax
jmp 0x100518ef
mov edx, dword [ebp - 0xca8c]
mov eax, dword [ebp - 0xca68]
push 0x102
push edx
push eax
push str.Parsing_error_at_line__d_of_file__s._Number_of_bytes____d._QLIB_FTM_NFC_ExecuteNciSequenceFile_function_aborted_
lea ecx, [ebp - 0x404]
push 0x400
push ecx
call dword [sym.imp.MSVCR100.dll__snprintf]
mov eax, dword [ebp - 0xca88]
mov ecx, dword [eax + 0x18]
lea edx, [ebp - 0x404]
push edx
mov edx, dword [ecx]
push 0x10
push edx
call fcn.10115e20
lea eax, [ebp - 0x404]
add esp, 0x24
mov ecx, eax
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10051a10
mov edi, dword [ebp - 0xca70]
sub eax, ecx
mov edx, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10051a22
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp - 0xca84]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.MSVCR100.dll_fclose]
mov ecx, dword [ebp - 0xca7c]
mov dword [ecx], 4
jmp 0x10051901
mov edx, dword [ebp - 0xca8c]
mov eax, dword [ebp - 0xca68]
push edx
push eax
push str.Parsing_error_at_line__d_of_file__s._Non_hexadecimal_character_in_data._QLIB_FTM_NFC_ExecuteNciSequenceFile_function_aborted_
lea ecx, [ebp - 0x404]
push 0x400
push ecx
call dword [sym.imp.MSVCR100.dll__snprintf]
mov eax, dword [ebp - 0xca88]
mov ecx, dword [eax + 0x18]
lea edx, [ebp - 0x404]
push edx
mov edx, dword [ecx]
push 0x10
push edx
call fcn.10115e20
lea eax, [ebp - 0x404]
add esp, 0x20
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10051aa2
mov edi, dword [ebp - 0xca70]
sub eax, ecx
mov edx, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10051ab4
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp - 0xca84]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.MSVCR100.dll_fclose]
mov ecx, dword [ebp - 0xca7c]
mov dword [ecx], 5
jmp 0x10051901
mov edx, dword [ebp - 0xca8c]
mov eax, dword [ebp - 0xca68]
push edx
push eax
push str.Parsing_error_at_line__d_of_file__s._Non_hexadecimal_character_in_data._QLIB_FTM_NFC_ExecuteNciSequenceFile_function_aborted_
lea ecx, [ebp - 0x404]
push 0x400
push ecx
call dword [sym.imp.MSVCR100.dll__snprintf]
mov eax, dword [ebp - 0xca88]
mov ecx, dword [eax + 0x18]
lea edx, [ebp - 0x404]
push edx
mov edx, dword [ecx]
push 0x10
push edx
call fcn.10115e20
lea eax, [ebp - 0x404]
add esp, 0x20
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10051b34
mov edi, dword [ebp - 0xca70]
sub eax, ecx
mov edx, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10051b46
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp - 0xca84]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.MSVCR100.dll_fclose]
mov ecx, dword [ebp - 0xca7c]
mov dword [ecx], 5
jmp 0x10051901
mov edx, dword [ebp - 0xca8c]
mov eax, dword [ebp - 0xca68]
push edx
push eax
push str.Parsing_error_at_line__d_of_file__s._Number_of_bytes_is_inconsistent_with_nci_payload_length_byte__3rd_byte_of_packet_._QLIB_FTM_NFC_ExecuteNciSequenceFile_function_aborted_
lea ecx, [ebp - 0x404]
push 0x400
push ecx
call dword [sym.imp.MSVCR100.dll__snprintf]
mov eax, dword [ebp - 0xca88]
mov ecx, dword [eax + 0x18]
lea edx, [ebp - 0x404]
push edx
mov edx, dword [ecx]
push 0x10
push edx
call fcn.10115e20
lea eax, [ebp - 0x404]
add esp, 0x20
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10051bc6
mov edi, dword [ebp - 0xca70]
sub eax, ecx
mov edx, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10051bd8
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp - 0xca84]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.MSVCR100.dll_fclose]
mov ecx, dword [ebp - 0xca7c]
mov dword [ecx], 6
jmp 0x10051901
mov edx, dword [ebp - 0xca8c]
mov eax, dword [ebp - 0xca68]
push edx
push eax
push str.QLIB_FTM_NFC_NFCC_CMD_RSP_failed_at_line__d_of_file__s._QLIB_FTM_NFC_ExecuteNciSequenceFile_function_aborted_
lea ecx, [ebp - 0x404]
push 0x400
push ecx
call dword [sym.imp.MSVCR100.dll__snprintf]
mov eax, dword [ebp - 0xca88]
mov ecx, dword [eax + 0x18]
lea edx, [ebp - 0x404]
push edx
mov edx, dword [ecx]
push 0x10
push edx
call fcn.10115e20
lea eax, [ebp - 0x404]
add esp, 0x20
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10051c58
mov edi, dword [ebp - 0xca70]
sub eax, ecx
mov edx, ecx
dec edi
lea ebx, [ebx]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10051c70
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp - 0xca84]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.MSVCR100.dll_fclose]
mov ecx, dword [ebp - 0xca7c]
mov eax, dword [ebp - 0xca68]
mov edx, dword [ebp - 0xca78]
mov dword [ecx], 2
push eax
mov dword [edx], eax
mov eax, dword [ecx]
mov ecx, dword [ebp - 0xca80]
push eax
push str.QLIB_FTM_NFC_ExecuteNciSequenceFile__piErrorCode___d__piErrorLineNum___d__
push ecx
call fcn.101224b0
add esp, 0x14
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10203cc8
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0xca8c]
push edx
push str.Could_not_open_file__s.__QLIB_FTM_NFC_ExecuteNciSequenceFile_function_aborted_
lea eax, [ebp - 0x404]
push 0x400
push eax
call dword [sym.imp.MSVCR100.dll__snprintf]
mov edx, dword [ebp - 0xca88]
mov eax, dword [edx + 0x18]
lea ecx, [ebp - 0x404]
push ecx
mov ecx, dword [eax]
push 0x10
push ecx
call fcn.10115e20
lea eax, [ebp - 0x404]
add esp, 0x1c
mov ecx, eax
lea ecx, [ecx]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10051d20
sub eax, ecx
mov edx, ecx
lea edi, [ebx - 1]
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10051d30
mov ecx, eax
shr ecx, 2
mov esi, edx
mov edx, dword [ebp - 0xca7c]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp - 0xca78]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0xca80]
mov dword [edx], 7
mov dword [eax], 0
mov ecx, dword [ebp - 0xca78]
mov edx, dword [ecx]
mov eax, dword [ebp - 0xca7c]
mov ecx, dword [eax]
push edx
push ecx
push str.QLIB_FTM_NFC_ExecuteNciSequenceFile__piErrorCode___d__piErrorLineNum___d__
push esi
call fcn.101224b0
mov ecx, dword [ebp - 4]
mov al, byte [ebp - 0xca69]
add esp, 0x10
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10203cc8
mov esp, ebp
pop ebp
ret