Function at 0x10005120
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10166a38
mov eax, dword fs:[0]
push eax
sub esp, 0x5a8
mov eax, dword [0x101c7e54]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x574], eax
mov dword [ebp - 0x564], 0
call fcn.1000cdb6
mov ecx, eax
test ecx, ecx
je 0x100057a5
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x524], eax
mov dword [ebp - 4], 0
mov byte [ebp - 0x559], 0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x530]
push 0
mov byte [ebp - 0x538], 0
call fcn.10009080
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x594]
push 0
mov byte [ebp - 0x59c], 0
call fcn.10009080
mov byte [ebp - 4], 4
mov eax, dword [ebx + 4]
test eax, eax
je 0x1000538b
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SDT_OpenPort
push eax
call esi
push str.SDT_ClosePort
push dword [ebx + 4]
mov edi, eax
call esi
push str.SDT_StartFindIDCard
push dword [ebx + 4]
mov dword [ebp - 0x568], eax
call esi
push str.SDT_SelectIDCard
push dword [ebx + 4]
mov dword [ebp - 0x570], eax
call esi
push str.SDT_ReadBaseMsg
push dword [ebx + 4]
mov dword [ebp - 0x56c], eax
call esi
push str.SDT_ReadBaseFPMsg
push dword [ebx + 4]
mov dword [ebp - 0x560], eax
call esi
push 0x3e9
call edi
cmp eax, 0x90
je 0x1000525f
push eax
push 0x3e9
lea eax, [ebp - 0x524]
push 0x101aa930
push eax
call fcn.1000c5f0
add esp, 0x10
push 0x3e9
call dword [ebp - 0x568]
jmp 0x1000539f
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
xor esi, esi
mov ebx, dword [ebp - 0x570]
nop dword [eax]
push 0
lea eax, [ebp - 0x554]
push eax
push 0x3e9
call ebx
cmp eax, 0x9f
jne 0x100052b6
push 0
lea eax, [ebp - 0x18]
push eax
push 0x3e9
call dword [ebp - 0x56c]
cmp eax, 0x90
je 0x100052e7
push eax
lea eax, [ebp - 0x524]
push 0x101aa954
push eax
call fcn.1000c5f0
add esp, 0xc
jmp 0x100052ca
lea eax, [ebp - 0x524]
push 0x101aa97c
push eax
call fcn.1000c5f0
add esp, 8
push 0x3e8
call edi
inc esi
cmp esi, 0xa
jl 0x10005270
push 0x3e9
call dword [ebp - 0x568]
jmp 0x1000539f
lea eax, [ebp - 0x524]
push 0x101aa970
push eax
call fcn.1000c5f0
add esp, 8
mov byte [ebp - 0x559], 0
lea eax, [ebp - 0x558]
push 0
push eax
lea eax, [ebp - 0x520]
push eax
lea eax, [ebp - 0x528]
push eax
lea eax, [ebp - 0x120]
push eax
push 0x3e9
call dword [ebp - 0x560]
cmp eax, 0x90
je 0x10005354
push eax
lea eax, [ebp - 0x524]
push 0x101aa99c
push eax
call fcn.1000c5f0
add esp, 0xc
push 0x3e9
call dword [ebp - 0x568]
jmp 0x1000539f
push 0x12
push 0x101aa9d4
lea ecx, [ebp - 0x524]
call fcn.10003e70
lea edx, [ebp - 0x59c]
lea ecx, [ebp - 0x120]
call fcn.100058b0
push 0x3e9
mov byte [ebp - 0x559], 1
call dword [ebp - 0x568]
jmp 0x1000539f
lea eax, [ebp - 0x524]
push 0x101aa9e8
push eax
call fcn.1000c5f0
add esp, 8
movzx edx, byte [ebp - 0x559]
lea ecx, [ebp - 0x20]
xorps xmm0, xmm0
mov byte [ebp - 0x20], 0
movq qword [ebp - 0x18], xmm0
lea edx, [edx - 1]
call fcn.1000bc20
push str.code
lea ecx, [ebp - 0x538]
mov byte [ebp - 4], 9
call fcn.10009950
mov cl, byte [ebp - 0x20]
mov edi, eax
mov eax, dword [ebp - 0x18]
mov dl, byte [edi]
mov byte [edi], cl
mov esi, dword [edi + 0xc]
mov ecx, dword [ebp - 0x14]
mov byte [ebp - 0x560], dl
mov byte [ebp - 0x20], dl
mov edx, dword [edi + 8]
mov dword [edi + 8], eax
mov dword [edi + 0xc], ecx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], esi
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x18]
push dword [ebp - 0x560]
call fcn.10008080
mov byte [ebp - 4], 4
mov esi, dword [ebp - 0x524]
cmp dword [esi - 4], 1
jle 0x10005431
push dword [esi - 0xc]
lea ecx, [ebp - 0x524]
call fcn.10003c50
mov esi, dword [ebp - 0x524]
mov ecx, esi
mov dword [ebp - 0x58c], 0
mov dword [ebp - 0x57c], 0
mov dword [ebp - 0x578], 0xf
mov byte [ebp - 0x58c], 0
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10005460
sub ecx, edx
push ecx
push esi
lea ecx, [ebp - 0x58c]
call fcn.10003670
lea edx, [ebp - 0x58c]
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x5b4]
call fcn.10004120
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x20]
xorps xmm0, xmm0
mov byte [ebp - 0x20], 0
mov edx, eax
movq qword [ebp - 0x18], xmm0
call fcn.1000bc80
push 0x101aaa14
lea ecx, [ebp - 0x538]
mov byte [ebp - 4], 0xd
call fcn.10009950
mov cl, byte [ebp - 0x20]
mov ebx, eax
mov eax, dword [ebp - 0x18]
mov dl, byte [ebx]
mov byte [ebx], cl
mov edi, dword [ebx + 0xc]
mov ecx, dword [ebp - 0x14]
mov byte [ebp - 0x560], dl
mov byte [ebp - 0x20], dl
mov edx, dword [ebx + 8]
mov dword [ebx + 8], eax
mov dword [ebx + 0xc], ecx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], edi
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x18]
push dword [ebp - 0x560]
call fcn.10008080
mov byte [ebp - 4], 0xb
mov edx, dword [ebp - 0x5a0]
cmp edx, 0x10
jb 0x10005533
mov ecx, dword [ebp - 0x5b4]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10005529
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100057af
push edx
push ecx
call fcn.1014559f
add esp, 8
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x578]
mov dword [ebp - 0x5a4], 0
mov dword [ebp - 0x5a0], 0xf
mov byte [ebp - 0x5b4], 0
cmp edx, 0x10
jb 0x1000558c
mov ecx, dword [ebp - 0x58c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10005582
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100057af
push edx
push ecx
call fcn.1014559f
add esp, 8
cmp byte [ebp - 0x59c], 0
jne 0x100055be
sub esp, 8
lea ecx, [ebp - 0x584]
mov eax, esp
mov dword [eax], 0
mov dword [eax + 4], 0
call fcn.10007120
add esp, 8
mov ecx, eax
mov eax, 1
jmp 0x100055d7
lea eax, [ebp - 0x59c]
push eax
lea ecx, [ebp - 0x5ac]
call fcn.10006dc0
mov ecx, eax
mov eax, 2
mov bl, byte [ecx]
mov edi, dword [ecx + 8]
mov dword [ebp - 0x564], eax
mov eax, dword [ecx + 0xc]
mov byte [ebp - 0x20], bl
mov dword [ebp - 0x560], eax
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], eax
mov byte [ecx], 0
mov dword [ecx + 8], 0
mov dword [ecx + 0xc], 0
push str.data
lea ecx, [ebp - 0x538]
mov dword [ebp - 4], 0x11
call fcn.10009950
mov cl, byte [eax]
mov byte [eax], bl
mov edx, dword [eax + 0xc]
mov byte [ebp - 0x56c], cl
mov byte [ebp - 0x20], cl
mov ecx, dword [eax + 8]
mov dword [eax + 8], edi
mov edi, dword [ebp - 0x560]
mov dword [eax + 0xc], edi
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], edx
push dword [ebp - 0x56c]
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0x12
call fcn.10008080
mov ebx, dword [ebp - 0x564]
test bl, 2
je 0x10005682
and ebx, 0xfffffffd
mov dword [ebp - 0x564], ebx
mov dword [ebp - 4], 0x13
lea ecx, [ebp - 0x5a4]
push dword [ebp - 0x5ac]
call fcn.10008080
mov dword [ebp - 4], 4
test bl, 1
je 0x100056a7
mov byte [ebp - 4], 0x14
lea ecx, [ebp - 0x57c]
push dword [ebp - 0x584]
call fcn.10008080
mov byte [ebp - 4], 4
sub esp, 0x10
lea eax, [ebp - 0x550]
lea ecx, [ebp - 0x538]
push eax
call fcn.10006af0
mov edi, dword [ebp - 0x53c]
lea ecx, [ebp - 0x550]
mov edx, dword [ebp - 0x550]
cmp edi, 0x10
mov ebx, dword [ebp - 0x574]
cmovae ecx, edx
sub ebx, ecx
nop dword [eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [ebx + ecx - 1], al
test al, al
jne 0x100056e0
cmp edi, 0x10
jb 0x1000571d
lea ecx, [edi + 1]
mov eax, edx
cmp ecx, 0x1000
jb 0x10005713
mov edx, dword [edx - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100057b4
push ecx
push edx
call fcn.1014559f
add esp, 8
mov dword [ebp - 0x540], 0
mov dword [ebp - 0x53c], 0xf
mov byte [ebp - 0x550], 0
mov byte [ebp - 4], 0x15
lea ecx, [ebp - 0x594]
push dword [ebp - 0x59c]
call fcn.10008080
mov byte [ebp - 4], 0x16
lea ecx, [ebp - 0x530]
push dword [ebp - 0x538]
call fcn.10008080
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x10005781
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov al, byte [ebp - 0x559]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10145591
mov esp, ebp
pop ebp
ret 8
push 0x80004005
call fcn.10003fb0
call fcn.1014a37f
call fcn.1014a37f
int3