int iRcTSFID_RUDLL_GetFinger(char fpflag[3], unsigned char fpminu1[200],
                             unsigned char fpminu2[100]) {
  unsigned int uiDataLen, uiRet;
  char *psFunCall = malloc(100);
  uiDataLen = sprintf(psFunCall, "%u(b003", 4104);
  memcpy(psFunCall + uiDataLen, fpflag, 3);
  uiDataLen += 3;
  uiDataLen += sprintf(psFunCall + uiDataLen, ",b000,b000)");
  uiRet = iDoRemoteFunc((unsigned char *)psFunCall, uiDataLen, 61);
  free(psFunCall);
  if (uiRet) {
    vWriteLogTxt("iRcTSFID_RUDLL_GetFinger iDoRemoteFunc ret = %d", uiRet);
    return 99;
  }
  if (iGetParaInt(0) == 0) {
    memcpy(fpminu1, psGetParaBuf(3), 200);
    memcpy(fpminu2, psGetParaBuf(4), 100);
  }
  return iGetParaInt(0);
}


x86 assembly (clang, -O0):
<iRcTSFID_RUDLL_GetFinger>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    $0x64,%edi
call   1080 <malloc@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xe53(%rip),%rsi
mov    $0x1008,%edx
mov    $0x0,%al
call   10a0 <sprintf@plt>
mov    %eax,-0x24(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    -0x10(%rbp),%rdx
mov    (%rdx),%si
mov    %si,(%rax,%rcx,1)
mov    0x2(%rdx),%dl
mov    %dl,0x2(%rax,%rcx,1)
mov    -0x24(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x24(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x24(%rbp),%eax
add    %rax,%rdi
lea    0xe19(%rip),%rsi
mov    $0x0,%al
call   10a0 <sprintf@plt>
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    $0x3d,%edx
mov    $0x0,%al
call   1090 <iDoRemoteFunc@plt>
mov    %eax,-0x28(%rbp)
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
cmpl   $0x0,-0x28(%rbp)
je     1242 <iRcTSFID_RUDLL_GetFinger+0xc2>
mov    -0x28(%rbp),%esi
lea    0xde5(%rip),%rdi
mov    $0x0,%al
call   1060 <vWriteLogTxt@plt>
movl   $0x63,-0x4(%rbp)
jmp    12aa <iRcTSFID_RUDLL_GetFinger+0x12a>
xor    %edi,%edi
mov    $0x0,%al
call   1040 <iGetParaInt@plt>
cmp    $0x0,%eax
jne    129e <iRcTSFID_RUDLL_GetFinger+0x11e>
mov    -0x18(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    $0x3,%edi
mov    $0x0,%al
call   1050 <psGetParaBuf@plt>
mov    -0x40(%rbp),%rdi
movslq %eax,%rsi
mov    $0xc8,%edx
call   1070 <memcpy@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    $0x4,%edi
mov    $0x0,%al
call   1050 <psGetParaBuf@plt>
mov    -0x38(%rbp),%rdi
movslq %eax,%rsi
mov    $0x64,%edx
call   1070 <memcpy@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1040 <iGetParaInt@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iRcTSFID_RUDLL_GetFinger>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%rbp
mov    $0x64,%edi
call   1080 <malloc@plt>
mov    %rax,%rbx
lea    0xe5c(%rip),%rsi
mov    %rax,%rdi
mov    $0x1008,%edx
xor    %eax,%eax
call   10a0 <sprintf@plt>
mov    %eax,%ecx
movzwl 0x0(%rbp),%edx
mov    %dx,(%rbx,%rcx,1)
mov    0x2(%rbp),%dl
mov    %dl,0x2(%rbx,%rcx,1)
lea    0x3(%rax),%ecx
movabs $0x30622c303030622c,%rdx
2c 62 30
mov    %rdx,(%rbx,%rcx,1)
movl   $0x293030,0x8(%rbx,%rcx,1)
lea    0xe(%rax),%esi
mov    %rbx,%rdi
mov    $0x3d,%edx
xor    %eax,%eax
call   1090 <iDoRemoteFunc@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <free@plt>
test   %ebp,%ebp
je     121d <iRcTSFID_RUDLL_GetFinger+0x9d>
lea    0xe10(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1060 <vWriteLogTxt@plt>
mov    $0x63,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %edi,%edi
xor    %eax,%eax
call   1040 <iGetParaInt@plt>
test   %eax,%eax
jne    128f <iRcTSFID_RUDLL_GetFinger+0x10f>
mov    $0x3,%edi
xor    %eax,%eax
call   1050 <psGetParaBuf@plt>
movslq %eax,%rsi
mov    $0xc8,%edx
mov    %r14,%rdi
call   1070 <memcpy@plt>
mov    $0x4,%edi
xor    %eax,%eax
call   1050 <psGetParaBuf@plt>
cltq
movups (%rax),%xmm0
movups 0x10(%rax),%xmm1
movups 0x20(%rax),%xmm2
movups 0x30(%rax),%xmm3
movups %xmm0,(%r15)
movups %xmm1,0x10(%r15)
movups %xmm2,0x20(%r15)
movups %xmm3,0x30(%r15)
movups 0x40(%rax),%xmm0
movups %xmm0,0x40(%r15)
movups 0x50(%rax),%xmm0
movups %xmm0,0x50(%r15)
mov    0x60(%rax),%eax
mov    %eax,0x60(%r15)
xor    %edi,%edi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <iGetParaInt@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"%u(b003\00"
@.str.1 = [12 x i8] c",b000,b000)\00"
@.str.2 = [48 x i8] c"iRcTSFID_RUDLL_GetFinger iDoRemoteFunc ret = %d\00"
define i32 @iRcTSFID_RUDLL_GetFinger(i8* %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%11 = call i8* @malloc(i64 100)
store i8* %11, i8** %10
%12 = load i8*, i8** %10
%13 = call i32 (i8*, i8*, ...) @sprintf(i8* %12, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 4104)
store i32 %13, i32* %8
%14 = load i8*, i8** %10
%15 = load i32, i32* %8
%16 = zext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8*, i8** %5
%19 = load i32, i32* %8
%20 = add i32 %19, 3
store i32 %20, i32* %8
%21 = load i8*, i8** %10
%22 = load i32, i32* %8
%23 = zext i32 %22 to i64
%24 = getelementptr inbounds i8, i8* %21, i64 %23
%25 = call i32 (i8*, i8*, ...) @sprintf(i8* %24, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%26 = load i32, i32* %8
%27 = add i32 %26, %25
store i32 %27, i32* %8
%28 = load i8*, i8** %10
%29 = load i32, i32* %8
%30 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @iDoRemoteFunc to i32 (i8*, i32, i32, ...)*)(i8* %28, i32 %29, i32 61)
store i32 %30, i32* %9
%31 = load i8*, i8** %10
%32 = load i32, i32* %9
%33 = icmp ne i32 %32, 0
br i1 %33, label %34, label %37
34: ; preds = %3
%35 = load i32, i32* %9
%36 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @vWriteLogTxt to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0), i32 %35)
store i32 99, i32* %4
br label %51
37: ; preds = %3
%38 = call i32 (i32, ...) bitcast (i32 (...)* @iGetParaInt to i32 (i32, ...)*)(i32 0)
%39 = icmp eq i32 %38, 0
br i1 %39, label %40, label %49
40: ; preds = %37
%41 = load i8*, i8** %6
%42 = call i32 (i32, ...) bitcast (i32 (...)* @psGetParaBuf to i32 (i32, ...)*)(i32 3)
%43 = sext i32 %42 to i64
%44 = inttoptr i64 %43 to i8*
%45 = load i8*, i8** %7
%46 = call i32 (i32, ...) bitcast (i32 (...)* @psGetParaBuf to i32 (i32, ...)*)(i32 4)
%47 = sext i32 %46 to i64
%48 = inttoptr i64 %47 to i8*
br label %49
49: ; preds = %40, %37
%50 = call i32 (i32, ...) bitcast (i32 (...)* @iGetParaInt to i32 (i32, ...)*)(i32 0)
store i32 %50, i32* %4
br label %51
51: ; preds = %49, %34
%52 = load i32, i32* %4
ret i32 %52
}

LLVM IR (-O2):
@.str = [8 x i8] c"%u(b003\00"
@.str.1 = [12 x i8] c",b000,b000)\00"
@.str.2 = [48 x i8] c"iRcTSFID_RUDLL_GetFinger iDoRemoteFunc ret = %d\00"
define i32 @iRcTSFID_RUDLL_GetFinger(i8* nocapture %0, i8* nocapture writeonly %1, i8* nocapture writeonly %2) {
%4 = tail call dereferenceable_or_null(100) i8* @malloc(i64 100)
%5 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %4, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 4104)
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %4, i64 %6
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(3) %7, i8* align 1 dereferenceable(3) %0, i64 3, i1 false)
%8 = add i32 %5, 3
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %4, i64 %9
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(12) %10, i8* align 1 dereferenceable(12) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i64 12, i1 false)
%11 = add i32 %5, 14
%12 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @iDoRemoteFunc to i32 (i8*, i32, i32, ...)*)(i8* %4, i32 %11, i32 61)
tail call void @free(i8* %4)
%13 = icmp eq i32 %12, 0
br i1 %13, label %16, label %14
14: ; preds = %3
%15 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @vWriteLogTxt to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0), i32 %12)
br label %28
16: ; preds = %3
%17 = tail call i32 (i32, ...) bitcast (i32 (...)* @iGetParaInt to i32 (i32, ...)*)(i32 0)
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %26
19: ; preds = %16
%20 = tail call i32 (i32, ...) bitcast (i32 (...)* @psGetParaBuf to i32 (i32, ...)*)(i32 3)
%21 = sext i32 %20 to i64
%22 = inttoptr i64 %21 to i8*
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(200) %1, i8* align 1 dereferenceable(200) %22, i64 200, i1 false)
%23 = tail call i32 (i32, ...) bitcast (i32 (...)* @psGetParaBuf to i32 (i32, ...)*)(i32 4)
%24 = sext i32 %23 to i64
%25 = inttoptr i64 %24 to i8*
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(100) %2, i8* align 1 dereferenceable(100) %25, i64 100, i1 false)
br label %26
26: ; preds = %19, %16
%27 = tail call i32 (i32, ...) bitcast (i32 (...)* @iGetParaInt to i32 (i32, ...)*)(i32 0)
br label %28
28: ; preds = %26, %14
%29 = phi i32 [ 99, %14 ], [ %27, %26 ]
ret i32 %29
}