Function at 0x10001000
Capabilities:
Check if file exists
Get file attributes
Read .ini file

Disassembly:
push ebp
lea ebp, [esp - 0x30c]
sub esp, 0x30c
push 0xffffffffffffffff
push 0x1002dc6e
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x10039b68]
xor eax, ebp
mov dword [ebp + 0x308], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x30], 0x1003d8b4
call fcn.1000b39a
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x1000105d
push 0x80004005
call fcn.1000a950
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [0x1003d8b4], eax
mov dword [ebp - 4], 0
call fcn.1000b39a
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x1000108f
push 0x80004005
call fcn.1000a950
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [0x1003d8b8], eax
mov byte [ebp - 4], 1
call fcn.1000b39a
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x100010be
push 0x80004005
call fcn.1000a950
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 2
call fcn.1000b39a
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x100010eb
push 0x80004005
call fcn.1000a950
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x1c], eax
mov byte [ebp - 4], 3
call fcn.1000b39a
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x10001118
push 0x80004005
call fcn.1000a950
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 4
call fcn.1000b39a
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x10001145
push 0x80004005
call fcn.1000a950
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x20], eax
push str.C:UnionPayCardConf.ini
mov byte [ebp - 4], 5
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x100011bf
push 0x10032ae4
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x100011bf
push 0x104
lea ecx, [ebp]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x1000119a
push str.C:UnionPayCardConf.ini
lea ecx, [ebp - 0x14]
call fcn.1000a8f0
jmp 0x100011ce
lea edx, [ebp]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
lea eax, [ebp]
push eax
lea ecx, [ebp - 0x14]
call fcn.1000a8f0
push str.UnionPayCardConf.ini
lea ecx, [ebp - 0x14]
call fcn.10009f30
jmp 0x100011ce
push 0x17
push str.C:UnionPayCardConf.ini
lea ecx, [ebp - 0x14]
call fcn.1000a800
mov edi, dword [ebp - 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push edi
push 0
push str.WriteLog
push 0x10032b1c
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push edi
push 0x104
lea ecx, [ebp + 0x204]
push ecx
push str.C:DeviceDriverLogCardPaymentLog_
push str.LogAddress
push 0x10032b1c
mov dword [ebp - 0x28], eax
mov dword [0x1003d8bc], eax
call ebx
test eax, eax
jne 0x1000121f
push 0x22
push str.C:DeviceDriverLogCardPaymentLog_
jmp 0x10001239
lea eax, [ebp + 0x204]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10001228
sub eax, edx
push eax
lea edx, [ebp + 0x204]
push edx
lea ecx, [ebp - 0x18]
call fcn.1000a800
push edi
push 1
push str.CardPaymentPort
push 0x10032b1c
call esi
mov esi, eax
push esi
lea eax, [ebp - 0x20]
push 0x10032f94
push eax
call fcn.1000a600
add esp, 0xc
lea ecx, [ebp - 0x24]
cmp esi, 9
ja 0x10001280
push 0x10032b6c
push ecx
lea ecx, [ebp - 0x20]
call fcn.10009f70
mov byte [ebp - 4], 6
jmp 0x10001292
push str..COM
push ecx
lea ecx, [ebp - 0x20]
call fcn.10009f70
mov byte [ebp - 4], 7
push eax
mov ecx, 0x1003d8b8
call fcn.1000a500
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
or ecx, 0xffffffff
lea edx, [eax + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x100012c0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push edi
push pe_nt_image_headers32
lea ecx, [ebp + 0x104]
push ecx
push str.UnknownDevice
push str.DeviceName
push 0x10032b1c
call ebx
test eax, eax
jne 0x100012eb
push 0xd
push str.UnknownDevice
jmp 0x10001305
lea eax, [ebp + 0x104]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100012f4
sub eax, edx
push eax
lea edx, [ebp + 0x104]
push edx
lea ecx, [ebp - 0x1c]
call fcn.1000a800
mov ebx, dword [ebp - 0x1c]
push str.ICT3K7_3R4245
push ebx
call fcn.1001979f
add esp, 8
test eax, eax
sete al
test al, al
je 0x10001333
mov dword [0x1003d8c4], 1
jmp 0x1000139b
push str.ICT3K7_3R6940
push ebx
call fcn.1001979f
add esp, 8
test eax, eax
sete al
test al, al
je 0x10001356
mov dword [0x1003d8c4], 2
jmp 0x1000139b
push str.ICT3K5_3R4245
push ebx
call fcn.1001979f
add esp, 8
test eax, eax
sete al
test al, al
je 0x10001379
mov dword [0x1003d8c4], 3
jmp 0x1000139b
push str.ICT3K5_3R6940
push ebx
call fcn.1001979f
add esp, 8
test eax, eax
sete al
movzx eax, al
neg eax
sbb eax, eax
and eax, 4
mov dword [0x1003d8c4], eax
push edi
push 0x1c200
push str.Baudrate
push 0x10032b1c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push 0x3c
mov dword [0x1003d8cc], eax
mov byte [ebp - 4], 8
call fcn.1000b360
mov esi, eax
add esp, 4
mov dword [ebp - 0x24], esi
mov byte [ebp - 4], 9
test esi, esi
je 0x10001406
mov eax, dword [ebp - 0x18]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x2c], esp
mov edi, esp
push eax
call fcn.1000a490
mov ecx, dword [ebp - 0x28]
add esp, 4
push ecx
add eax, 0x10
push esi
mov dword [edi], eax
call fcn.1000a9f0
mov edi, dword [ebp - 0x14]
mov dword [0x1003d8c0], eax
mov dword [ebp - 4], 5
jmp 0x10001433
xor eax, eax
mov dword [0x1003d8c0], eax
mov dword [ebp - 4], 5
jmp 0x10001433
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
mov dword [0x1003d8c8], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x10001460
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10001480
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x100014a0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x100014c3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 0x1003d8b4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x308]
xor ecx, ebp
call fcn.10019164
add ebp, 0x30c
mov esp, ebp
pop ebp
ret