Function at 0x10030380
Capabilities:
Get file size

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x28c
mov eax, dword [0x10086084]
xor eax, esp
mov dword [esp + 0x288], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
xor edi, edi
mov dword [esp + 0x2c], eax
push 0x230
lea eax, [esp + 0x64]
mov dword [esp + 0x24], ebx
push edi
push eax
mov dword [esp + 0x28], esi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x3c], edi
call sub.msvcrt.dll_memset
mov dword [esp + 0x54], edi
xor eax, eax
mov dword [esp + 0x58], edi
xor ecx, ecx
mov dword [esp + 0x48], edi
inc ecx
mov dword [esp + 0x20], edi
add esp, 0xc
lea edi, [esp + 0x50]
mov dword [esp + 0x18], ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov dword [esp + 0x34], eax
test ebx, ebx
je 0x10030505
cmp dword [ebx], 0xfeedf001
jne 0x10030505
test esi, esi
je 0x10030505
cmp word [esi], ax
je 0x10030505
mov edi, dword [esp + 0x2c]
test edi, edi
je 0x10030505
cmp dword [ebp + 0x14], eax
je 0x1003044f
cmp dword [ebp + 0x14], 0x800000
jne 0x10030505
push 0x57
pop esi
push 0x230
lea eax, [esp + 0x64]
push eax
push ebx
call sym.WIMGAPI.DLL_WIMGetAttributes
test eax, eax
je 0x10030508
xor eax, eax
inc eax
cmp word [esp + 0x282], ax
jne 0x10030508
mov eax, dword [esp + 0x278]
mov ecx, ebx
push 6
pop esi
mov dword [esp + 0x44], eax
call fcn.100310a3
cmp eax, 0xffffffff
je 0x10030508
push 0x57
pop esi
lea ecx, [esp + 0x48]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x100304c2
mov ecx, dword [esp + 0x4c]
cmp ecx, dword [edi + 4]
jg 0x100304c2
mov eax, dword [esp + 0x48]
jl 0x100304bb
cmp eax, dword [edi]
jae 0x100304c2
mov dword [edi], eax
mov dword [edi + 4], ecx
jmp 0x10030508
push 6
pop esi
xor eax, eax
xor edx, edx
push eax
mov ecx, ebx
call fcn.100314e2
mov dword [esp + 0x30], eax
test eax, eax
je 0x10030508
mov eax, dword [ebx + 8]
mov dword [esp + 0x3c], eax
test eax, eax
je 0x10030508
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x40]
push eax
xor edx, edx
call fcn.1003670e
mov esi, eax
mov dword [esp + 0x24], eax
neg esi
sbb esi, esi
not esi
and esi, 8
jmp 0x10030508
push 0x57
pop esi
test esi, esi
jne 0x10030694
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x38]
push eax
xor edx, edx
call fcn.1003670e
mov ebx, eax
mov dword [esp + 0xc], ebx
test ebx, ebx
je 0x10030557
push 0x14
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x10030557
mov ecx, dword [esp + 0x18]
mov word [eax + 8], cx
mov ecx, dword [esp + 0x14]
mov dword [eax + 0xc], ebx
mov dword [eax + 0x10], ecx
mov dword [esp + 0x14], eax
jmp 0x1003055f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [esp + 0x28]
cmp dword [esp + 0x1c], eax
jne 0x10030588
test eax, eax
je 0x1003057e
push eax
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x28], eax
test esi, esi
jne 0x10030694
test ebx, ebx
je 0x10030694
mov edi, dword [esp + 0x38]
test edi, edi
je 0x10030694
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x10030694
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x28c]
call fcn.10030c3b
test eax, eax
je 0x100305ca
or esi, 0x20000000
mov ecx, dword [esp + 0x20]
xor eax, eax
push eax
call fcn.10030d9c
push eax
push esi
push 2
push 0x40000000
push ebx
call sym.WIMGAPI.DLL_WIMCreateFile
mov ebx, eax
test ebx, ebx
je 0x10030682
mov ecx, dword [esp + 0x20]
call fcn.10030e57
mov edx, eax
mov ecx, ebx
call fcn.10030e85
test dword [ebp + 0x14], 0x800000
je 0x10030616
lea edx, [esp + 0x268]
call fcn.10030fd9
mov eax, dword [esp + 0x14]
mov dword [eax], ebx
movzx eax, word [edi]
test ax, ax
je 0x10030638
push dword [esp + 0xc]
mov esi, eax
xor eax, eax
push ebx
mov word [edi], ax
call sym.WIMGAPI.DLL_WIMSetTemporaryPath
mov word [edi], si
mov eax, dword [esp + 0x18]
mov ecx, ebx
push eax
mov edx, eax
call fcn.100313bf
cmp dword [esp + 0x34], 0
jne 0x10030660
lea esi, [ebx + 0x30]
lea edi, [esp + 0x50]
movsd dword es:[edi], dword [esi]
lea eax, [esp + 0x50]
mov dword [esp + 0x34], eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
xor eax, eax
xor edx, edx
push eax
mov ecx, ebx
call fcn.100314e2
test eax, eax
je 0x10030682
mov ecx, dword [esp + 0x14]
mov dword [ecx + 4], eax
xor eax, eax
lea edi, [eax + 1]
mov dword [esp + 0x10], edi
jmp 0x10030686
mov edi, dword [esp + 0x10]
test edi, edi
jne 0x100306a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x10030698
mov edi, dword [esp + 0x10]
test edi, edi
je 0x100307f4
mov ebx, dword [esp + 0x14]
lea eax, [esp + 0x3c]
mov ecx, dword [esp + 0x30]
mov edx, ebx
push eax
push dword [esp + 0x30]
call fcn.1002ff42
mov dword [esp + 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [esp + 0x10], 0
mov esi, eax
je 0x100307f8
cmp esi, 0xea
jne 0x100307f8
push 0x2e
pop eax
push eax
push dword [esp + 0x44]
call dword [sym.imp.msvcrt.dll_wcsrchr]
mov esi, eax
xor ebx, ebx
pop ecx
pop ecx
test esi, esi
je 0x10030767
mov ecx, dword [esp + 0x24]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x100306fa
sub ecx, edx
sar ecx, 1
lea edi, [ecx + 0xc]
lea eax, [edi + edi]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
mov dword [esp + 0x28], ebx
test ebx, ebx
je 0x100307cb
xor eax, eax
mov word [ebx], ax
mov word [esi], ax
mov eax, dword [esp + 0x18]
inc eax
movzx ecx, ax
push ecx
push dword [esp + 0x28]
mov dword [esp + 0x20], eax
push 0x10006830
push edi
push ebx
call fcn.1001fec9
add esp, 0x14
mov edx, edi
mov ecx, ebx
push 0x2e
pop eax
push esi
mov word [esi], ax
call fcn.1001a5bc
jmp 0x100307c1
mov edi, dword [esp + 0x24]
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x10030770
sub ecx, edx
sar ecx, 1
lea esi, [ecx + 0xc]
lea eax, [esi + esi]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
mov dword [esp + 0x28], ebx
test ebx, ebx
je 0x100307cb
xor eax, eax
mov word [ebx], ax
mov eax, dword [esp + 0x18]
inc eax
mov dword [esp + 0x18], eax
movzx eax, ax
push eax
push edi
push 0x10006830
push esi
push ebx
call fcn.1001fec9
add esp, 0x14
xor eax, eax
mov dword [esp + 0x1c], ebx
mov esi, eax
jmp 0x100307d7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jne 0x100307f4
push ecx
push dword [esp + 0x30]
mov ecx, dword [esp + 0x28]
lea eax, [esp + 0x24]
push eax
mov edx, 0x9482
call fcn.1002894a
jmp 0x10030508
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x30]
mov dword [esp + 0xc], esi
test eax, eax
je 0x1003080a
push eax
call sym.WIMGAPI.DLL_WIMCloseHandle
test ebx, ebx
je 0x100308f0
mov esi, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
mov edi, ebx
mov ebx, dword [ebx + 0x10]
movzx eax, word [edi + 8]
mov ecx, dword [edi]
push eax
call fcn.100313bf
mov eax, dword [edi]
test eax, eax
je 0x10030840
cmp dword [eax], 0xfeedf001
jne 0x10030840
mov ecx, dword [esp + 0x44]
mov dword [eax + 0x44], ecx
mov eax, dword [esp + 0x34]
test eax, eax
je 0x10030851
mov ecx, dword [edi]
mov edx, eax
call fcn.10030fd9
xor eax, eax
inc eax
cmp word [esp + 0x18], ax
jbe 0x1003086e
xor eax, eax
mov ecx, eax
mov eax, dword [edi]
test eax, eax
je 0x1003086e
mov ecx, dword [eax + 0x28]
or ecx, 8
mov dword [eax + 0x28], ecx
xor ecx, ecx
mov eax, ecx
test esi, esi
je 0x10030879
mov eax, dword [esi + 0x28]
test al, al
jns 0x1003088f
mov eax, dword [edi]
test eax, eax
je 0x1003088f
mov ecx, dword [eax + 0x28]
or ecx, 0x80
mov dword [eax + 0x28], ecx
cmp dword [esp + 0x10], 0
je 0x100308a0
mov ecx, dword [edi]
push 0x10
pop edx
call fcn.10030fbd
push dword [edi + 4]
call sym.WIMGAPI.DLL_WIMCloseHandle
push dword [edi]
call sym.WIMGAPI.DLL_WIMCloseHandle
cmp dword [edi + 0xc], 0
je 0x100308d1
push dword [edi + 0xc]
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test eax, eax
je 0x100308d1
xor eax, eax
mov dword [edi + 0xc], eax
push edi
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test ebx, ebx
jne 0x10030816
mov esi, dword [esp + 0xc]
jmp 0x100308f2
xor edi, edi
mov eax, dword [esp + 0x24]
test eax, eax
je 0x10030909
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 0x28]
test eax, eax
je 0x10030920
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test esi, esi
je 0x1003092b
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [esp + 0x294]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10083b20
mov esp, ebp
pop ebp
ret 0x10