Function at 0x5d9d80
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push edi
mov eax, 0x108c
lea edi, [esp + 8]
and esp, 0xfffffff0
push dword [edi - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
call fcn.00447e80
sub esp, eax
mov eax, dword [edi]
mov edx, dword [edi + 4]
mov dword [ebp - 0x1078], 0
mov dword [ebp - 0x1074], 0
mov ebx, ecx
mov dword [ebp - 0x1040], eax
mov dword [ebp - 0x103c], edx
cmp dword [ebp - 0x103c], 0
jl 0x510650
jle 0x510640
mov dword [ebp - 0x1054], 0x1000
mov dword [ebp - 0x1058], 0
mov eax, dword [ebx + 0x30]
mov edi, dword [ebx + 0x7c]
mov ecx, dword [ebx + 4]
and eax, 0x20
test edi, edi
mov dword [ebp - 0x1038], ecx
mov dword [ebp - 0x106c], eax
je 0x510670
cmp edi, 1
mov byte [ebp - 0x1025], 0
mov dword [ebp - 0x1060], 0
mov dword [ebp - 0x105c], 0
je 0x51068a
mov eax, dword [ebp - 0x1054]
cmp byte [ebp - 0x1025], 0
lea esi, [ebp - 0x1018]
mov dword [ebp - 0x104c], edi
mov edi, ebx
mov byte [ebp - 0x1034], 0
mov byte [ebp - 0x1048], 1
mov dword [ebp - 0x1030], 0
mov dword [ebp - 0x1020], eax
mov eax, dword [ebp - 0x1058]
mov dword [ebp - 0x102c], 0
mov dword [ebp - 0x1050], esi
mov dword [ebp - 0x1024], esi
mov ecx, dword [edi + 0x40]
mov dword [ebp - 0x101c], eax
je 0x5104dc
test ecx, ecx
je 0x5101b4
mov eax, dword [ebp - 0x1060]
mov edx, dword [ebp - 0x105c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x1020]
mov dword [esp + 0x10], edx
mov edx, dword [ebp - 0x101c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1024]
mov dword [esp + 8], edx
mov dword [esp], eax
call fcn.00608c20
sub esp, 0x14
cmp edx, 0
jl 0x5101b4
jle 0x510740
add dword [ebp - 0x1060], eax
adc dword [ebp - 0x105c], edx
cmp dword [ebp - 0x104c], 1
je 0x510196
add dword [edi + 0x48], eax
adc dword [edi + 0x4c], edx
add dword [ebp - 0x1030], eax
adc dword [ebp - 0x102c], edx
add dword [ebp - 0x1024], eax
sub dword [ebp - 0x1020], eax
sbb dword [ebp - 0x101c], edx
mov esi, dword [ebp - 0x101c]
mov ebx, dword [ebp - 0x1020]
mov edx, esi
sar edx, 0x1f
mov eax, edx
sub eax, ebx
sbb edx, esi
mov eax, edx
movzx edx, byte [ebp - 0x1034]
shr eax, 0x1f
xor edx, 1
and dl, al
mov byte [ebp - 0x1068], dl
je 0x510323
cmp dword [ebp - 0x104c], 1
mov eax, dword [ebp - 0x1038]
mov edx, dword [eax]
je 0x510232
mov ecx, dword [edi + 0x48]
mov eax, dword [edi + 0x4c]
mov ebx, dword [edi + 0x54]
mov esi, dword [edi + 0x50]
xor ebx, eax
xor esi, ecx
or ebx, esi
je 0x510232
mov ebx, dword [ebp - 0x1038]
mov dword [esp], ecx
mov dword [esp + 4], eax
mov ecx, ebx
call dword [edx + 0x44]
sub esp, 8
test al, al
mov byte [ebp - 0x1034], al
je 0x5105fd
mov edx, dword [ebx]
mov eax, dword [ebp - 0x106c]
test eax, eax
jne 0x5103c0
mov eax, dword [edi + 0x68]
mov ebx, dword [ebp - 0x1020]
mov esi, eax
mov dword [ebp - 0x1048], eax
sar esi, 0x1f
mov ecx, esi
mov dword [ebp - 0x1044], esi
mov esi, dword [ebp - 0x101c]
cmp esi, ecx
jg 0x510274
jl 0x510405
cmp ebx, eax
jb 0x510405
cmp byte [ebp - 0x1025], 0
jne 0x510405
mov ebx, dword [ebp - 0x1020]
mov esi, dword [ebp - 0x101c]
mov eax, dword [ebp - 0x1024]
mov ecx, dword [ebp - 0x1038]
mov dword [esp + 4], ebx
mov dword [esp + 8], esi
mov dword [esp], eax
call dword [edx + 0x64]
mov ecx, ebx
sub esp, 0xc
xor ecx, eax
mov dword [ebp - 0x1034], ecx
mov ebx, dword [ebp - 0x1034]
mov ecx, esi
xor ecx, edx
or ebx, ecx
setne byte [ebp - 0x1034]
cmp edx, 0
jle 0x510793
add dword [ebp - 0x1030], eax
adc dword [ebp - 0x102c], edx
add dword [ebp - 0x1024], eax
sub dword [ebp - 0x1020], eax
sbb dword [ebp - 0x101c], edx
cmp dword [ebp - 0x104c], 1
je 0x51031c
mov dword [ebp - 0x1048], eax
mov dword [ebp - 0x1044], edx
movq xmm0, qword [ebp - 0x1048]
punpcklqdq xmm0, xmm0
movdqu xmm1, xmmword [edi + 0x48]
paddq xmm0, xmm1
movups xmmword [edi + 0x48], xmm0
mov byte [ebp - 0x1048], 0
test byte [edi + 0x30], 0x10
je 0x510510
mov esi, dword [ebp - 0x1050]
cmp dword [ebp - 0x1024], esi
jbe 0x510510
mov ebx, dword [ebp - 0x1024]
jmp 0x51035b
add esi, 1
cmp ebx, esi
je 0x510730
cmp byte [esi], 0xd
jne 0x510350
cmp ebx, esi
mov dword [ebp - 0x1024], ebx
mov edx, esi
jbe 0x510853
mov ecx, ebx
jmp 0x51037d
mov byte [edx], al
add edx, 1
cmp ebx, esi
je 0x5103ab
add esi, 1
movzx eax, byte [esi - 1]
cmp al, 0xd
jne 0x510374
add dword [ebp - 0x1030], 0xffffffff
adc dword [ebp - 0x102c], 0xffffffff
sub ecx, 1
add dword [ebp - 0x1020], 1
adc dword [ebp - 0x101c], 0
cmp ebx, esi
jne 0x51037d
mov dword [ebp - 0x1050], ecx
jmp 0x5104c6
cmp byte [ebp - 0x1025], 0
je 0x510281
mov eax, dword [edi + 0x68]
mov ebx, dword [ebp - 0x1020]
mov esi, eax
mov dword [ebp - 0x1048], eax
sar esi, 0x1f
mov ecx, esi
mov dword [ebp - 0x1044], esi
mov esi, dword [ebp - 0x101c]
cmp esi, ecx
jl 0x5103f9
jg 0x510405
cmp ebx, eax
ja 0x510405
mov dword [ebp - 0x1048], ebx
mov dword [ebp - 0x1044], esi
mov ebx, dword [ebp - 0x1048]
mov esi, dword [ebp - 0x1044]
mov edx, dword [edx + 0x64]
mov ecx, dword [edi + 0x40]
mov dword [esp], ebx
mov dword [esp + 4], esi
mov dword [ebp - 0x1034], edx
call fcn.004c51b0
sub esp, 8
mov ecx, dword [ebp - 0x1038]
mov edx, dword [ebp - 0x1034]
mov dword [esp + 4], ebx
mov dword [esp + 8], esi
mov dword [esp], eax
call edx
mov dword [ebp - 0x1044], esi
mov ecx, dword [ebp - 0x1044]
sub esp, 0xc
mov dword [ebp - 0x1048], ebx
xor ebx, eax
xor ecx, edx
or ebx, ecx
setne byte [ebp - 0x1034]
cmp edx, 0
jle 0x5105b0
mov ebx, dword [ebp - 0x1048]
mov esi, dword [ebp - 0x1044]
mov ecx, dword [edi + 0x40]
mov dword [ebp - 0x1048], eax
mov dword [ebp - 0x1044], edx
sub ebx, eax
sbb esi, edx
mov dword [esp], ebx
mov dword [esp + 4], esi
call fcn.004c3c00
sub esp, 8
cmp dword [ebp - 0x104c], 1
mov eax, dword [ebp - 0x1048]
mov edx, dword [ebp - 0x1044]
je 0x5104b9
add dword [edi + 0x50], eax
adc dword [edi + 0x54], edx
mov ecx, dword [ebp - 0x1024]
mov byte [ebp - 0x1048], 0
cmp byte [ebp - 0x1025], 0
mov dword [ebp - 0x1024], ecx
mov ecx, dword [edi + 0x40]
jne 0x510133
test ecx, ecx
je 0x5101b4
mov eax, dword [ebp - 0x1020]
mov edx, dword [ebp - 0x101c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1024]
mov dword [esp + 8], edx
mov dword [esp], eax
call fcn.004c4130
sub esp, 0xc
jmp 0x510170
cmp byte [ebp - 0x1025], 0
mov ebx, edi
je 0x51052d
mov eax, dword [ebp - 0x1060]
mov edx, dword [ebp - 0x105c]
mov dword [edi + 0x70], eax
mov dword [edi + 0x74], edx
cmp byte [ebp - 0x1048], 0
jne 0x5106c0
mov edx, dword [ebp - 0x1058]
mov esi, dword [ebp - 0x1030]
mov edi, dword [ebp - 0x102c]
mov eax, dword [ebp - 0x1054]
xor edx, edi
xor eax, esi
or edx, eax
jne 0x5107b0
add dword [ebp - 0x1078], esi
adc dword [ebp - 0x1074], edi
sub dword [ebp - 0x1040], esi
sbb dword [ebp - 0x103c], edi
cmp dword [ebp - 0x103c], 0
jl 0x510592
jg 0x510064
cmp dword [ebp - 0x1040], 0
ja 0x510064
mov eax, dword [ebp - 0x1078]
mov edx, dword [ebp - 0x1074]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
lea esp, [edi - 8]
pop edi
ret 8
jl 0x5105bb
cmp eax, 0
ja 0x510470
mov dword [ebp - 0x1068], eax
mov dword [ebp - 0x1064], edx
mov eax, dword [ebp - 0x1048]
mov edx, dword [ebp - 0x1044]
mov ecx, dword [edi + 0x40]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.004c3c00
mov edx, dword [ebp - 0x1064]
sub esp, 8
mov eax, edx
mov byte [ebp - 0x1048], 0
shr eax, 0x1f
mov dword [ebp - 0x1068], eax
mov eax, dword [ebp - 0x1030]
mov edx, dword [ebp - 0x102c]
mov ebx, eax
or ebx, edx
jne 0x510323
cmp byte [ebp - 0x1068], 0
je 0x510323
mov ebx, edi
mov dword [ebp - 0x1030], 0xffffffff
mov dword [ebp - 0x102c], 0xffffffff
jmp 0x51053a
cmp dword [ebp - 0x1040], 0xfff
ja 0x510077
mov eax, dword [ebp - 0x1040]
mov edx, dword [ebp - 0x103c]
mov dword [ebp - 0x1054], eax
mov dword [ebp - 0x1058], edx
jmp 0x51008b
mov eax, dword [ecx]
call dword [eax + 0x30]
test al, al
mov byte [ebp - 0x1025], al
je 0x510750
mov dword [ebx + 0x7c], 1
movzx eax, byte [ebx + 0x78]
test al, al
mov byte [ebp - 0x1025], al
je 0x510775
mov eax, dword [ebx + 0x70]
mov edx, dword [ebx + 0x74]
mov edi, 1
mov dword [ebp - 0x1060], eax
mov dword [ebp - 0x105c], edx
jmp 0x5100cf
mov edx, dword [ebx + 0x40]
test edx, edx
je 0x510703
mov eax, dword [edx + 8]
mov edx, dword [edx + 0xc]
mov edi, edx
or edi, eax
je 0x510703
cmp byte [ebx + 0x78], 0
je 0x51053a
mov ecx, dword [ebx + 0x7c]
test ecx, ecx
je 0x510803
cmp ecx, 1
jne 0x51053a
mov edi, dword [ebx + 0x70]
mov ecx, dword [ebx + 0x74]
xor edx, ecx
xor eax, edi
or edx, eax
jne 0x51053a
mov ecx, dword [ebp - 0x1038]
mov edi, dword [ebp - 0x1024]
mov eax, dword [ecx]
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp], edi
call dword [eax + 0x64]
sub esp, 0xc
jmp 0x51053a
mov dword [ebp - 0x1050], esi
mov ecx, esi
jmp 0x5104c6
cmp eax, 0
jbe 0x5101b4
jmp 0x51017b
mov dword [ebx + 0x7c], 2
mov edi, 2
mov dword [ebp - 0x1060], 0
mov dword [ebp - 0x105c], 0
jmp 0x5100cf
mov edi, 1
mov dword [ebp - 0x1060], 0
mov dword [ebp - 0x105c], 0
jmp 0x5100cf
jl 0x5105eb
cmp eax, 0
ja 0x5102d0
jmp 0x5105eb
mov esi, dword [ebp - 0x1074]
mov ebx, dword [ebp - 0x1078]
mov eax, esi
or eax, ebx
jne 0x5107e0
mov eax, dword [ebp - 0x1030]
mov edx, dword [ebp - 0x102c]
mov dword [ebp - 0x1078], eax
mov dword [ebp - 0x1074], edx
jmp 0x510592
mov edx, dword [ebp - 0x1030]
mov ecx, dword [ebp - 0x102c]
mov eax, edx
and eax, ecx
cmp eax, 0xffffffff
je 0x510842
add dword [ebp - 0x1030], ebx
adc dword [ebp - 0x102c], esi
jmp 0x5107c2
mov ecx, dword [ebx + 4]
mov eax, dword [ecx]
call dword [eax + 0x30]
test al, al
je 0x510836
mov esi, dword [ebx + 0x40]
xor eax, eax
xor edx, edx
mov dword [ebx + 0x7c], 1
mov edi, dword [ebx + 0x70]
mov ecx, dword [ebx + 0x74]
test esi, esi
je 0x5106f7
mov eax, dword [esi + 8]
mov edx, dword [esi + 0xc]
jmp 0x5106f7
mov dword [ebx + 0x7c], 2
jmp 0x51053a
mov dword [ebp - 0x1030], ebx
mov dword [ebp - 0x102c], esi
jmp 0x5107c2
mov eax, dword [ebp - 0x1024]
mov dword [ebp - 0x1050], eax
mov ecx, eax
jmp 0x5104c6
push ebp
push edi
push esi
push ebx
mov esi, ecx
sub esp, 0x4c
mov ebx, dword [ecx + 4]
mov ebp, dword [esp + 0x64]
mov edi, dword [esp + 0x60]
test ebp, ebp
js 0x5da0e5
mov eax, dword [ebx + 0x30]
test al, 1
jne 0x5d9dd1
test eax, eax
mov ecx, str.WriteOnly_device
jne 0x5d9db1
mov ecx, str.device_not_open
mov edx, str.skip
mov eax, esi
call fcn.00481240
mov eax, 0xffffffff
mov edx, 0xffffffff
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret 8
mov edx, dword [ebx + 0x7c]
test edx, edx
mov dword [esp + 0x18], edx
je 0x5d9f10
cmp dword [esp + 0x18], 1
je 0x5d9f23
test al, 0x10
jne 0x5d9ef0
mov ecx, dword [ebx + 0x40]
test ecx, ecx
je 0x5d9f60
mov eax, dword [ecx + 8]
mov edx, dword [ecx + 0xc]
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], edx
or edx, eax
mov dword [esp + 0x30], eax
jne 0x5d9fe0
cmp dword [esp + 0x18], 1
je 0x5d9f90
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x40]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x48]
mov dword [esp + 0x1c], edx
mov edx, dword [ebx + 0x4c]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x18]
sub eax, dword [esp + 0x28]
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x1c]
sbb edx, dword [esp + 0x2c]
mov dword [esp + 0x30], eax
mov dword [esp + 0x18], eax
cmp edx, ebp
mov dword [esp + 0x34], edx
mov dword [esp + 0x1c], edx
jl 0x5d9e7e
jle 0x5da090
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], ebp
cmp dword [esp + 0x1c], 0
jl 0x5d9f90
jle 0x5da0b0
mov eax, dword [esi]
mov edx, dword [esp + 0x2c]
mov ecx, esi
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x28]
add eax, dword [esp + 0x18]
adc edx, dword [esp + 0x1c]
mov dword [esp], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 4], edx
call dword [eax + 0x44]
sub esp, 8
test al, al
je 0x5da071
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
cmp edx, ebp
jl 0x5d9f75
jg 0x5d9eda
cmp eax, edi
jb 0x5d9f75
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
add eax, edi
adc edx, ebp
jmp 0x5d9dc7
mov dword [esp + 0x60], edi
mov dword [esp + 0x64], ebp
add esp, 0x4c
mov ecx, ebx
pop ebx
pop esi
pop edi
pop ebp
jmp 0x510020
mov ecx, dword [ebx + 4]
mov eax, dword [ecx]
call dword [eax + 0x30]
test al, al
je 0x5d9f40
mov dword [ebx + 0x7c], 1
cmp byte [ebx + 0x78], 0
jne 0x5d9ef0
mov dword [esp + 0x18], 1
mov eax, dword [ebx + 0x30]
jmp 0x5d9deb
mov dword [ebx + 0x7c], 2
mov dword [esp + 0x18], 2
mov eax, dword [ebx + 0x30]
jmp 0x5d9deb
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
jmp 0x5d9e24
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
add dword [esp + 0x20], eax
adc dword [esp + 0x24], edx
sub edi, eax
sbb ebp, edx
lea esi, [esi]
mov ecx, ebx
mov eax, dword [ebx]
mov eax, dword [eax + 0x14]
mov dword [esp], edi
mov dword [esp + 4], ebp
cmp eax, 0x5120c0
jne 0x5da0a0
call 0x510020
sub esp, 8
mov ebp, dword [esp + 0x24]
mov edi, dword [esp + 0x20]
mov esi, ebp
or esi, edi
je 0x5d9dc7
mov ecx, eax
and ecx, edx
cmp ecx, 0xffffffff
je 0x5da0c0
add eax, edi
adc edx, ebp
jmp 0x5d9dc7
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x24], eax
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
cmp edx, ebp
jl 0x5da00a
jg 0x5d9ffe
cmp eax, edi
jbe 0x5da00a
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], ebp
mov eax, edi
mov edx, ebp
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.004c3ec0
sub esp, 8
cmp dword [esp + 0x18], 1
je 0x5da02e
mov eax, dword [esp + 0x20]
add dword [ebx + 0x48], eax
mov edx, dword [esp + 0x24]
adc dword [ebx + 0x4c], edx
mov eax, dword [ebx + 0x40]
test eax, eax
je 0x5da03d
mov edx, dword [eax + 0xc]
or edx, dword [eax + 8]
jne 0x5da05e
mov eax, dword [esi]
mov ecx, esi
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp], 0
call dword [eax + 0x64]
sub esp, 0xc
cmp dword [esp + 0x28], ebp
jle 0x5da0d0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
jmp 0x5d9dc7
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
mov esi, edx
or esi, eax
jne 0x5d9dc7
or eax, 0xffffffff
mov edx, eax
jmp 0x5d9dc7
cmp eax, edi
jbe 0x5d9e7e
jmp 0x5d9e76
call eax
sub esp, 8
jmp 0x5d9fb1
cmp dword [esp + 0x18], 0
jbe 0x5d9f90
jmp 0x5d9e8f
mov eax, edi
mov edx, ebp
jmp 0x5d9dc7
jl 0x5da0d8
cmp dword [esp + 0x30], edi
jae 0x5da064
sub edi, dword [esp + 0x20]
sbb ebp, dword [esp + 0x24]
jmp 0x5d9e24
mov ecx, str.Called_with_maxSize___0
jmp 0x5d9db1