Function at 0x513c70
Capabilities:
Get disk size

Disassembly:
sub esp, 0x818
push ebx
push ebp
push esi
mov esi, dword [esp + 0x82c]
push edi
mov dword [esp + 0x54], 1
lea eax, [esp + 0x3d8]
mov ecx, 0xeef8
mov dword [esp + 0x1c], eax
xor eax, eax
mov edi, esi
xor ebx, ebx
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x82c]
xor ebp, ebp
push ecx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x4c], ebx
call fcn.00512430
lea edx, [esp + 0x5c]
mov byte [esi], al
mov eax, dword [esp + 0x830]
push 0x2a
push edx
push ebp
push eax
mov dword [esi + 0x10], 1
call fcn.0050b6c0
add esp, 0x14
test eax, eax
jne 0x513d09
mov byte [esi + 0x2ff0], 2
mov byte [esi + 0x2ff1], 3
jmp 0x513d2b
mov al, byte [esp + 0x5a]
mov dword [esp + 0x20], 1
mov cl, al
shr al, 2
and cl, 3
and al, 3
mov byte [esi + 0x2ff0], cl
mov byte [esi + 0x2ff1], al
mov eax, dword [esi + 0x10]
mov dl, byte [esi]
mov edi, dword [esp + 0x82c]
mov cl, byte [esi + 0x2ff0]
mov dword [esp + 0x30], eax
lea eax, [esp + 0x3d8]
push 0x450
push eax
mov byte [esp + 0x1f], dl
mov dl, byte [esi + 0x2ff1]
push 2
push 1
push edi
mov byte [esp + 0x3a], cl
mov byte [esp + 0x3b], dl
call fcn.0050b340
add esp, 0x14
test eax, eax
je 0x513e0c
mov ecx, dword [esp + 0x3d8]
mov edx, dword [esp + 0x3d9]
and ecx, 0xff
and edx, 0xff
shl ecx, 8
lea eax, [ecx + edx + 2]
cmp eax, 4
mov dword [esp + 0x2c], eax
jle 0x513e0c
cmp eax, 0x450
jbe 0x513f6a
push eax
call fcn.004f56e0
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
je 0x513e0c
mov ecx, dword [esp + 0x2c]
mov edx, eax
push ecx
push edx
push 2
push 1
push edi
call fcn.0050b340
add esp, 0x14
test eax, eax
jne 0x513f48
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x1c]
push eax
push ecx
push 2
push 1
push edi
call fcn.0050b340
add esp, 0x14
test eax, eax
jne 0x513f48
mov edx, dword [esp + 0x1c]
push edx
call fcn.0054111e
add esp, 4
mov edx, dword [esp + 0x30]
mov ebp, dword [esp + 0x82c]
mov ecx, 0xeef8
xor eax, eax
mov edi, esi
push 0x324
rep stosd dword es:[edi], eax
mov cl, byte [esp + 0x1b]
mov al, byte [esp + 0x2a]
mov dword [esi + 0x10], edx
lea edx, [esp + 0xb8]
push edx
mov byte [esi], cl
mov cl, byte [esp + 0x2f]
push 0
push 0
push ebp
mov byte [esi + 0x2ff0], al
mov byte [esi + 0x2ff1], cl
call fcn.0050b340
add esp, 0x14
test eax, eax
jne 0x514281
mov ecx, 0xc9
lea edi, [esp + 0xb4]
mov dword [esp + 0x30], eax
push eax
rep stosd dword es:[edi], eax
lea eax, [esp + 0x34]
lea ecx, [esp + 0xb8]
push eax
push 0x324
push ecx
push 0
push 0
push 0x24000
push ebp
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x514279
cmp dword [0x817700], 2
jge 0x5141fc
push 0x800
call fcn.004f56f0
mov edi, eax
add esp, 4
test edi, edi
mov ebx, 1
je 0x514201
push ebx
push 0x10
push edi
push 0
push ebp
call fcn.0045bd40
add esp, 0x14
cmp eax, ebx
jne 0x5141e3
xor eax, eax
xor edx, edx
mov ah, byte [edi + 0x53]
mov dl, byte [edi + 0x51]
mov al, byte [edi + 0x52]
xor ecx, ecx
mov cl, byte [edi + 0x50]
shl eax, 8
or eax, edx
shl eax, 8
or eax, ecx
je 0x5141e3
cmp eax, 0x10000000
jae 0x5141e3
xor ebp, ebp
mov dword [esi + 0x10], ebx
mov dword [esi + 0x2e3c], ebx
mov dword [esi + 0xc], ebx
mov byte [esi + 0x24], 2
mov dword [esi + 0x218], ebp
mov dword [esi + 0x9e8], eax
mov dword [esi + 0x21c], eax
mov dword [esi + 0x2e40], ebp
mov dword [esi + 0x2fe8], 0x800
mov dword [esp + 0x10], ebx
jmp 0x5141e5
mov eax, dword [esp + 0x1c]
xor ecx, ecx
xor edx, edx
mov cl, byte [eax]
mov dl, byte [eax + 1]
shl ecx, 8
lea eax, [ecx + edx + 2]
mov ecx, dword [esp + 0x2c]
cmp ecx, eax
jne 0x513e0c
mov eax, ecx
mov edx, dword [esp + 0x1c]
xor ecx, ecx
mov dword [esp + 0x3c], 0
mov cl, byte [edx + 3]
mov dword [esi + 0x2e3c], ecx
lea ecx, [eax - 4]
mov eax, 0xba2e8ba3
mul ecx
shr edx, 3
mov dword [esp + 0x40], edx
je 0x514187
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x28]
add eax, 7
xor ecx, ecx
mov cl, byte [eax - 3]
cmp ecx, dword [esp + 0x4c]
je 0x513fc2
xor edi, edi
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x18], edi
mov dword [esp + 0x28], edi
xor ebx, ebx
mov dword [esp + 0x38], edi
mov cl, byte [eax - 2]
and ecx, 0xfffffff0
cmp cl, 0x10
jne 0x514173
mov cl, byte [eax]
cmp cl, 0xa0
jne 0x51400a
xor ecx, ecx
mov cl, byte [eax + 5]
mov edi, ecx
test edi, edi
mov dword [esp + 0x28], edi
je 0x513e0c
mov ecx, dword [esp + 0x34]
test ecx, ecx
je 0x513ffc
inc ecx
cmp edi, ecx
jne 0x513e0c
xor ecx, ecx
mov cl, byte [eax + 6]
mov dword [esp + 0x38], ecx
jmp 0x514173
cmp cl, 0xa1
jne 0x51402d
xor ecx, ecx
mov cl, byte [eax + 5]
test ecx, ecx
mov dword [esp + 0x18], ecx
je 0x513e0c
cmp ecx, edi
jl 0x513e0c
jmp 0x514173
cmp cl, 0xa2
jne 0x51405b
xor ecx, ecx
xor ebx, ebx
mov cl, byte [eax + 5]
mov bl, byte [eax + 6]
lea ecx, [ecx + ecx*2]
lea ecx, [ecx + ecx*4]
lea ecx, [ebx + ecx*4 - 2]
lea ecx, [ecx + ecx*2]
lea ecx, [ecx + ecx*4]
lea ebx, [ecx + ecx*4]
xor ecx, ecx
mov cl, byte [eax + 7]
add ebx, ecx
jmp 0x514173
cmp cl, 1
jb 0x514173
cmp cl, 0x63
ja 0x514173
and ecx, 0xff
mov edi, ecx
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x513e0c
mov edx, dword [esp + 0x18]
test edx, edx
je 0x513e0c
test ebx, ebx
je 0x513e0c
cmp edi, ecx
jl 0x513e0c
cmp edi, edx
jg 0x513e0c
mov edx, dword [esp + 0x34]
inc edx
cmp edi, edx
jne 0x513e0c
test ebp, ebp
jne 0x5140b9
mov dword [esi + 0x10], edi
xor ecx, ecx
xor edx, edx
mov cl, byte [eax + 5]
mov dl, byte [eax + 6]
lea ecx, [ecx + ecx*2]
lea ecx, [ecx + ecx*4]
lea ecx, [edx + ecx*4 - 2]
xor edx, edx
mov dl, byte [eax + 7]
lea ecx, [ecx + ecx*2]
lea ecx, [ecx + ecx*4]
lea ecx, [ecx + ecx*4]
add ecx, edx
test ebp, ebp
mov dword [esi + ebp*4 + 0x218], ecx
jbe 0x5140fc
cmp edi, dword [esp + 0x28]
jle 0x5140fc
sub ecx, dword [esi + ebp*4 + 0x214]
mov dword [esi + ebp*4 + 0x9e4], ecx
cmp edi, dword [esp + 0x18]
jne 0x514114
mov edx, dword [esi + ebp*4 + 0x218]
mov ecx, ebx
sub ecx, edx
mov dword [esi + ebp*4 + 0x9e8], ecx
xor edx, edx
mov dl, byte [eax - 3]
dec edx
mov dword [esi + ebp*4 + 0x2e40], edx
mov cl, byte [eax - 2]
test cl, 4
jne 0x514130
mov byte [esi + ebp + 0x24], 1
jmp 0x51415f
mov ecx, dword [esp + 0x38]
test ecx, ecx
jne 0x51413f
mov byte [esi + ebp + 0x24], 2
jmp 0x51415f
cmp ecx, 0x10
je 0x51415a
cmp ecx, 1
je 0x51415a
cmp ecx, 0x20
je 0x51415a
cmp ecx, 2
je 0x51415a
mov byte [esi + ebp + 0x24], 2
jmp 0x51415f
mov byte [esi + ebp + 0x24], 4
mov edx, dword [esi + 0xc]
mov dword [esp + 0x34], edi
mov edi, dword [esp + 0x28]
inc edx
mov dword [esi + 0xc], edx
mov edx, dword [esp + 0x40]
inc ebp
mov ecx, dword [esp + 0x3c]
add eax, 0xb
inc ecx
cmp ecx, edx
mov dword [esp + 0x3c], ecx
jb 0x513fa3
mov ecx, dword [esi + 0xc]
mov edi, 1
cmp ecx, edi
jl 0x513e0c
mov eax, dword [esi + 0x2e3c]
cmp eax, edi
jl 0x513e0c
cmp ecx, eax
jl 0x513e0c
cmp dword [esp + 0x2c], 0x450
jbe 0x5141c4
mov eax, dword [esp + 0x1c]
push eax
call fcn.004f5720
add esp, 4
cmp byte [esi], 0xff
jne 0x5141cc
mov byte [esi], 1
mov dword [esi + 0x2fe8], 0x930
mov dword [esp + 0x10], edi
mov dword [esp + 0x50], edi
jmp 0x5144ba
xor ebp, ebp
push edi
call fcn.004f5720
mov eax, dword [esp + 0x14]
add esp, 4
cmp eax, ebp
jne 0x5144b0
jmp 0x514203
mov ebx, 1
xor ebp, ebp
cmp dword [esp + 0x20], ebp
je 0x514256
mov al, byte [esp + 0x5a]
test al, 3
je 0x51423a
mov edx, dword [esp + 0x61]
mov ecx, dword [esp + 0x5c]
and edx, 0xff
and ecx, 0xff
shl edx, 8
add edx, ecx
cmp edx, ebx
jne 0x5144b0
test al, 0xc
jne 0x5144b0
mov dword [esi + 0x2e3c], ebp
mov dword [esi + 0xc], ebp
mov dword [esi + 0x2fe8], 0x800
mov dword [esp + 0x10], ebx
jmp 0x5144ba
mov al, byte [esp + 0x17]
test al, al
jbe 0x5144b0
cmp al, 0xff
jae 0x5144b0
mov dword [esi + 0x2fe8], ebp
mov dword [esp + 0x10], ebx
jmp 0x5144ba
mov dword [esp + 0x48], 1
mov eax, dword [esp + 0x20]
test eax, eax
je 0x5142a9
mov edx, dword [esp + 0x61]
mov eax, dword [esp + 0x5c]
and edx, 0xff
and eax, 0xff
shl edx, 8
add edx, eax
mov dword [esi + 0x2e3c], edx
jmp 0x5142b3
mov dword [esi + 0x2e3c], 1
mov ecx, dword [esi + 0x2e3c]
test ecx, ecx
je 0x514b24
mov eax, dword [esp + 0xb6]
mov edx, dword [esp + 0xb7]
and eax, 0xff
and edx, 0xff
sub edx, eax
mov dword [esi + 0x10], eax
lea eax, [edx + 1]
cmp eax, 1
mov dword [esi + 0xc], eax
jl 0x514b24
cmp eax, 0x64
jg 0x514b24
cmp ecx, eax
jle 0x514301
mov dword [esi + 0x2e3c], eax
xor ebp, ebp
test eax, eax
jle 0x5144a6
mov edi, 0x9e8
lea eax, [esp + 0xbd]
mov ecx, dword [esp + 0x48]
test ecx, ecx
jne 0x514366
xor ecx, ecx
xor edx, edx
mov cl, byte [eax - 1]
mov dl, byte [eax]
shl ecx, 8
add ecx, edx
xor edx, edx
mov dl, byte [eax + 1]
xor ebx, ebx
shl ecx, 8
mov bl, byte [eax + 7]
add ecx, edx
xor edx, edx
mov dl, byte [eax + 2]
shl ecx, 8
add ecx, edx
xor edx, edx
mov dl, byte [eax + 8]
mov dword [edi + esi - 0x7d0], ecx
shl ebx, 8
add edx, ebx
xor ebx, ebx
mov bl, byte [eax + 9]
shl edx, 8
add edx, ebx
shl edx, 8
jmp 0x5143ad
xor ecx, ecx
xor edx, edx
mov cl, byte [eax]
mov dl, byte [eax + 1]
lea ecx, [ecx + ecx*2]
lea ecx, [ecx + ecx*4]
lea ecx, [edx + ecx*4 - 2]
xor edx, edx
mov dl, byte [eax + 2]
lea ecx, [ecx + ecx*2]
lea ecx, [ecx + ecx*4]
lea ecx, [ecx + ecx*4]
add ecx, edx
xor edx, edx
mov dl, byte [eax + 8]
xor ebx, ebx
mov bl, byte [eax + 9]
mov dword [edi + esi - 0x7d0], ecx
lea edx, [edx + edx*2]
lea edx, [edx + edx*4]
lea edx, [ebx + edx*4 - 2]
lea edx, [edx + edx*2]
lea edx, [edx + edx*4]
lea edx, [edx + edx*4]
xor ebx, ebx
mov bl, byte [eax + 0xa]
add edx, ebx
sub edx, ecx
mov dword [edi + esi], edx
mov ecx, dword [edi + esi]
xor edx, edx
cmp ecx, edx
jl 0x514b24
mov cl, byte [esi]
test cl, cl
jbe 0x5143d1
cmp cl, 0x10
jb 0x5143d6
cmp cl, 0xff
jne 0x5143f5
mov ecx, dword [esi + 0x2e3c]
mov ebx, dword [esi + 0xc]
cmp ecx, ebx
je 0x514407
cmp ecx, 1
jne 0x514b24
mov dword [edi + esi + 0x2458], edx
jmp 0x51440e
cmp dword [esi + 0x2e3c], 1
jne 0x514407
mov dword [edi + esi + 0x2458], edx
jmp 0x51440e
mov dword [edi + esi + 0x2458], ebp
test byte [eax - 4], 4
jne 0x51442f
mov byte [esi + ebp + 0x24], 1
mov cl, byte [esi]
cmp cl, 0xff
mov dword [esi + 0x2fe8], 0x930
jne 0x514494
mov byte [esi], 1
jmp 0x514494
mov cl, byte [esi]
test cl, cl
jbe 0x514485
cmp cl, 0x10
jae 0x514485
cmp dword [esp + 0x20], edx
je 0x514474
mov cl, byte [esp + 0x60]
test cl, cl
je 0x514474
cmp cl, 0x10
jne 0x51445e
mov byte [esi + ebp + 0x24], 4
mov dword [esi + 0x2fe8], 0x930
jmp 0x514494
cmp cl, 0x20
jne 0x514474
mov byte [esi + ebp + 0x24], 4
mov dword [esi + 0x2fe8], 0x930
jmp 0x514494
mov byte [esi + ebp + 0x24], 2
mov dword [esi + 0x2fe8], 0x930
jmp 0x514494
mov byte [esi + ebp + 0x24], 2
mov dword [esi + 0x2fe8], 0x800
mov ecx, dword [esi + 0xc]
inc ebp
add edi, 4
add eax, 8
cmp ebp, ecx
jl 0x514317
mov dword [esp + 0x10], 1
jmp 0x5144ba
cmp dword [esp + 0x10], ebx
jne 0x514b24
cmp byte [esi], 0
jne 0x5144db
mov eax, dword [esi + 0xc]
test eax, eax
jle 0x5144db
mov eax, dword [esp + 0x54]
test eax, eax
je 0x5144db
mov dword [esp + 0x54], 0
jmp 0x513c89
mov eax, dword [esp + 0x5e]
mov ebx, dword [esp + 0x63]
xor edi, edi
mov ecx, dword [esi + 0xc]
cmp edi, ecx
jl 0x51451a
mov eax, dword [esp + 0x20]
test eax, eax
je 0x514980
mov edx, dword [esp + 0x5e]
mov eax, ebx
and eax, 0xff
and edx, 0xff
shl eax, 8
add eax, edx
cmp edi, eax
jge 0x514980
mov eax, dword [esp + 0x5e]
mov edx, dword [esp + 0x838]
test edx, edx
je 0x514549
mov edx, dword [esp + 0x20]
test edx, edx
je 0x514549
and ebx, 0xff
and eax, 0xff
shl ebx, 8
add ebx, eax
cmp ecx, ebx
jne 0x514549
test edi, edi
jg 0x514980
mov ecx, dword [esi + 0x10]
mov edx, dword [esp + 0x82c]
lea eax, [esp + 0x84]
push 0x30
add ecx, edi
push eax
push ecx
push 1
push 0
push edx
call fcn.0050b740
add esp, 0x18
test eax, eax
jne 0x5145aa
test edi, edi
jne 0x514980
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [esi + 0x10]
mov edx, dword [esp + 0x82c]
lea eax, [esp + 0x84]
push 0x30
push eax
push ecx
push 1
push edi
push edx
call fcn.0050b740
add esp, 0x18
test eax, eax
je 0x514980
mov edx, dword [esp + 0x8c]
mov eax, dword [esp + 0x8d]
mov ecx, dword [esp + 0x8e]
mov ebp, dword [esp + 0x9c]
and edx, 0xff
and eax, 0xff
shl edx, 8
add edx, eax
mov eax, dword [esp + 0x8f]
shl edx, 8
and ecx, 0xff
and ebp, 0xff
add edx, ecx
mov ecx, dword [esp + 0x9d]
shl edx, 8
and eax, 0xff
and ecx, 0xff
shl ebp, 8
add edx, eax
mov eax, dword [esp + 0x9e]
add ebp, ecx
mov ecx, dword [esp + 0x9f]
shl ebp, 8
and eax, 0xff
and ecx, 0xff
add ebp, eax
shl ebp, 8
add ebp, ecx
test edi, edi
mov dword [esp + 0x18], ebp
jne 0x51463f
test edx, edx
jne 0x514980
jmp 0x514647
test edx, edx
je 0x514980
test ebp, ebp
je 0x514980
cmp dword [esi + 0x2fe8], 0x930
jne 0x51474e
cmp edi, dword [esi + 0xc]
jge 0x514751
cmp edx, dword [esi + edi*4 + 0x218]
jne 0x51474e
mov eax, dword [esi + edi*4 + 0x9e8]
cmp ebp, eax
jg 0x51474e
sub eax, ebp
cmp edi, 1
mov dword [esi + edi*4 + 0x858], eax
mov dword [esi + edi*4 + 0x6c8], eax
jl 0x51474e
mov eax, dword [esi + edi*4 + 0x6c4]
cmp eax, 0x98
jne 0x5146e5
mov ecx, dword [esi + edi*4 + 0x2e3c]
mov ebx, dword [esi + edi*4 + 0x2e40]
cmp ecx, ebx
jne 0x5146e5
mov eax, 2
mov dword [esi + edi*4 + 0x854], eax
mov dword [esi + edi*4 + 0x6c4], eax
mov eax, 0x96
mov dword [esi + edi*4 + 0x538], eax
mov dword [esi + edi*4 + 0x3a8], eax
jmp 0x51474e
mov ecx, 0x96
cmp eax, ecx
jne 0x51474e
mov eax, dword [esi + edi*4 + 0x2e3c]
mov ebx, dword [esi + edi*4 + 0x2e40]
cmp eax, ebx
jne 0x51474e
xor eax, eax
mov dword [esi + edi*4 + 0x854], eax
mov dword [esi + edi*4 + 0x6c4], eax
mov dword [esi + edi*4 + 0x538], ecx
mov dword [esi + edi*4 + 0x3a8], ecx
cmp dword [0x78a9a8], eax
je 0x51474e
mov eax, dword [esi + edi*4 + 0x9e4]
mov ecx, 2
cmp eax, ecx
jle 0x51474e
add eax, 0xfffffffe
mov dword [esi + edi*4 + 0x9e4], eax
mov dword [esi + edi*4 + 0x854], ecx
mov dword [esi + edi*4 + 0x6c4], ecx
cmp edi, dword [esi + 0xc]
mov ecx, dword [esp + 0x90]
mov ebx, dword [esp + 0x63]
jl 0x51482e
cmp byte [esi], 0x10
jb 0x514980
mov eax, dword [esp + 0x5e]
mov ebp, dword [esp + 0x86]
and ebx, 0xff
and eax, 0xff
shl ebx, 8
add ebx, eax
mov eax, dword [esp + 0xa4]
and eax, 0xff
and ebp, 0xff
shl eax, 8
add eax, ebp
cmp eax, ebx
jge 0x5147b2
mov eax, dword [esi + 0xc]
mov ebx, dword [esp + 0x63]
mov ebp, dword [esp + 0x18]
inc eax
mov dword [esi + 0xc], eax
jmp 0x51482e
mov al, byte [esi + 0x2ff1]
test al, al
je 0x514980
test byte [esp + 0x8b], 1
je 0x51481f
mov ebx, dword [esp + 0x91]
mov eax, ecx
and eax, 0xff
and ebx, 0xff
shl eax, 8
add eax, ebx
mov ebx, dword [esp + 0x92]
shl eax, 8
and ebx, 0xff
add eax, ebx
mov ebx, dword [esp + 0x93]
shl eax, 8
and ebx, 0xff
add eax, ebx
cmp eax, edx
je 0x514980
jle 0x51481f
mov ebp, dword [esp + 0x18]
sub eax, edx
cmp eax, ebp
jge 0x514823
mov ebp, eax
jmp 0x514823
mov ebp, dword [esp + 0x18]
mov eax, dword [esi + 0xc]
mov ebx, dword [esp + 0x63]
inc eax
mov dword [esi + 0xc], eax
mov al, byte [esi]
cmp al, 0x22
je 0x514844
cmp al, 0x25
je 0x514844
cmp al, 0x2a
je 0x514844
cmp al, 0x2e
jne 0x5148d3
cmp dword [esi + 0xc], 1
jne 0x5148d3
mov eax, dword [esp + 0x20]
test eax, eax
je 0x5148d3
mov eax, dword [esp + 0x5e]
and ebx, 0xff
shl ebx, 8
and eax, 0xff
add ebx, eax
cmp ebx, 1
jne 0x5148cf
test byte [esp + 0x8b], bl
je 0x5148cf
mov eax, dword [esp + 0x91]
and ecx, 0xff
shl ecx, 8
and eax, 0xff
add ecx, eax
mov eax, dword [esp + 0x92]
shl ecx, 8
and eax, 0xff
add ecx, eax
mov eax, dword [esp + 0x93]
shl ecx, 8
and eax, 0xff
add ecx, eax
cmp ecx, edx
jne 0x5148c5
mov al, byte [esi + 0x2ff1]
test al, al
je 0x514961
cmp ecx, edx
jle 0x5148cf
sub ecx, edx
cmp ecx, ebp
jge 0x5148cf
mov ebp, ecx
mov ebx, dword [esp + 0x63]
mov ecx, dword [esp + 0xa5]
mov dword [esi + edi*4 + 0x218], edx
mov edx, dword [esp + 0x87]
and ecx, 0xff
shl ecx, 8
and edx, 0xff
mov dword [esi + edi*4 + 0x9e8], ebp
lea eax, [ecx + edx - 1]
mov dword [esi + edi*4 + 0x2e40], eax
mov al, byte [esi]
cmp al, 0x10
jae 0x51492c
mov al, byte [esp + 0x8a]
and eax, 0xf
dec eax
je 0x51492c
dec eax
je 0x514952
sub eax, 0xd
je 0x51493b
mov al, byte [edi + esi + 0x24]
test al, al
jne 0x514931
mov byte [edi + esi + 0x24], 2
mov eax, dword [esp + 0x5e]
inc edi
jmp 0x5144e5
mov eax, dword [esp + 0x50]
test eax, eax
jne 0x514931
mov eax, dword [esp + 0x5e]
mov byte [edi + esi + 0x24], 1
inc edi
jmp 0x5144e5
mov eax, dword [esp + 0x5e]
mov byte [edi + esi + 0x24], 4
inc edi
jmp 0x5144e5
mov byte [esi + 0x2ff0], 0
mov byte [esi + 0x2ff1], 0
mov dword [esi + 0x2e3c], 0
mov dword [esi + 0xc], 0
mov eax, dword [esi + 0xc]
test eax, eax
jle 0x514997
mov ecx, dword [esi + eax*4 + 0x2e3c]
inc ecx
mov dword [esi + 0x2e3c], ecx
jmp 0x5149a1
mov dword [esi + 0x2e3c], 0
mov edx, dword [esp + 0x834]
push edx
call fcn.00464190
mov dword [esi + 0x2fdc], eax
mov eax, dword [esi + 0xc]
mov edi, 1
add esp, 4
cmp eax, edi
jne 0x5149f5
mov al, byte [esi]
cmp al, 0x16
je 0x5149e1
cmp al, 0x1a
je 0x5149e1
cmp al, 0x14
je 0x5149e1
cmp al, 0x27
je 0x5149e1
cmp al, 0x28
je 0x5149e1
cmp al, 0x2c
je 0x5149e1
cmp al, 0x30
jne 0x5149f5
mov ebp, dword [esp + 0x82c]
push esi
push eax
push ebp
call fcn.00514b80
add esp, 0xc
jmp 0x5149fc
mov ebp, dword [esp + 0x82c]
mov al, byte [esi]
cmp al, 0x13
jne 0x514a10
mov byte [esi + 0x2ff0], 1
mov byte [esi + 0x2ff1], 1
cmp al, 0x27
je 0x514a20
cmp al, 0x28
je 0x514a20
cmp al, 0x2c
je 0x514a20
cmp al, 0x30
jne 0x514a37
cmp byte [esi + 0x2ff0], 2
jne 0x514a37
mov byte [esi + 0x2ff0], 1
mov byte [esi + 0x2ff1], 1
cmp dword [esi + 0x2e3c], edi
jg 0x514a4a
cmp dword [esi + 0xc], edi
jg 0x514a4a
cmp byte [esi + 0x24], 1
jne 0x514a50
mov dword [esi + 0x2fd8], edi
push esi
push ebp
call fcn.005137e0
add esp, 8
neg eax
sbb eax, eax
xor ebx, ebx
inc eax
mov dword [esi + 0x2fd4], eax
mov eax, dword [esi + 0x2fdc]
cmp eax, ebx
je 0x514b1a
cmp dword [esi + 0xc], edi
jne 0x514af9
cmp dword [esi + 0x218], 0xffffff6a
jne 0x514af9
cmp dword [esi + 0x9e8], ebx
jne 0x514af9
lea ecx, [esp + 0x30]
push ebx
push ecx
lea edx, [esp + 0x48]
push 8
push edx
xor eax, eax
push ebx
push ebx
mov dword [esp + 0x58], eax
push 0x7405c
push ebp
mov dword [esp + 0x50], ebx
mov dword [esp + 0x64], eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x514aea
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
push ebx
push 0x800
push eax
push ecx
mov dword [esi + 0x218], ebx
call fcn.0053f650
mov dword [esi + 0x21c], eax
mov dword [esi + 0x9e8], eax
mov dword [esi + 0x2fd4], edi
jmp 0x514af9
mov ecx, 0xeef8
xor eax, eax
mov edi, esi
mov dword [esp + 0x10], ebx
rep stosd dword es:[edi], eax
cmp dword [esi + 0x2fdc], ebx
je 0x514b1a
cmp byte [esi], 0xff
jne 0x514b1a
cmp dword [esi + 0x9e8], 0x57e40
setl dl
dec edx
and edx, 0xf
inc edx
mov byte [esi], dl
push esi
push ebp
call fcn.00514d80
add esp, 8
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x818
ret