Function at 0x46b39c
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x13c
xor eax, eax
mov word [ebp - 0x1c], ax
push ebx
push esi
push edi
lea edi, [ebp - 0x1a]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
mov word [ebp - 0x30], ax
lea edi, [ebp - 0x2e]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
xor ebx, ebx
push eax
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
call fcn.004649e1
pop ecx
pop ecx
mov edi, 0x11609
push edi
test eax, eax
je 0x46b4cb
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
lea esi, [eax + ecx - 0x121c]
xor eax, eax
mov word [esi + 0x41a], ax
mov word [esi + 0xe2e], ax
mov word [esi + 0x61a], ax
mov word [esi + 0x81a], ax
mov word [esi + 0xa1a], ax
mov word [esi + 0xc1a], ax
mov word [esi + 0xe1a], ax
mov word [esi + 0x402], ax
mov word [esi + 0x202], ax
mov word [esi + 0x121a], ax
call fcn.004378e5
pop ecx
push edi
mov ebx, eax
push 0
push ebx
call fcn.0043cdc0
mov eax, dword [ebp - 4]
mov dword [ebx + 0xd7c5], eax
mov eax, dword [esi]
mov dword [ebx + 0xd7c9], eax
add esp, 0xc
lea eax, [ebx + 0xd7d1]
push eax
lea eax, [ebx + 0xd7cd]
push eax
call fcn.00464bce
push 0x121c
push esi
push ebx
call fcn.0043c5f0
add esp, 0x14
mov ecx, ebx
lea eax, [esi + 0x408]
lea edx, [ebp - 0x30]
push 2
mov dword [0x49a8cc], ecx
sub edx, eax
pop edi
movzx ebx, word [eax]
mov word [edx + eax], bx
add eax, edi
test bx, bx
jne 0x46b49d
add esi, 0xe1c
lea edx, [ebp - 0x1c]
sub edx, esi
movzx eax, word [esi]
mov word [edx + esi], ax
add esi, edi
test ax, ax
jne 0x46b4b6
xor ebx, ebx
jmp 0x46b608
call fcn.004378e5
pop ecx
push edi
mov esi, eax
push 0x485568
push esi
call fcn.0043c5f0
add esp, 0xc
push 0x103
lea eax, [ebp - 0x137]
push ebx
push eax
mov byte [ebp - 0x138], bl
call fcn.0043cdc0
add esp, 0xc
push str.data.cab
mov eax, 0x104
lea edi, [ebp - 0x138]
call fcn.0046d44b
push ebx
push ebx
push 3
push ebx
push 1
push SysReAllocStringLen
mov eax, edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
je 0x46b568
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
mov dword [esi + 0xd7c9], eax
call fcn.00438be5
pop ecx
push ebx
lea ecx, [ebp - 8]
push ecx
push dword [esi + 0xd7c9]
mov dword [esi + 0xd7c5], eax
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.theme.cab
mov eax, 0x104
lea edi, [ebp - 0x138]
call fcn.0046d44b
push ebx
push ebx
push 3
push ebx
push 1
push SysReAllocStringLen
mov eax, edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
je 0x46b5d3
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
mov dword [esi + 0xd7d1], eax
call fcn.00438be5
pop ecx
push ebx
lea ecx, [ebp - 8]
push ecx
push dword [esi + 0xd7d1]
mov dword [esi + 0xd7cd], eax
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, esi
push 2
mov dword [0x49a8cc], ecx
xor eax, eax
pop edi
movzx edx, word [eax + 0x485970]
mov word [ebp + eax - 0x30], dx
add eax, edi
cmp dx, bx
jne 0x46b5e0
xor eax, eax
movzx edx, word [eax + 0x486384]
mov word [ebp + eax - 0x1c], dx
add eax, edi
cmp dx, bx
jne 0x46b5f5
lea eax, [ebp - 0x1c]
mov dword [ecx + 0x133c], ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, edi
cmp cx, bx
jne 0x46b614
sub eax, edx
sar eax, 1
lea eax, [ebp + eax*2 - 0x1c]
cmp word [eax - 2], 0x2a
jne 0x46b643
mov ecx, dword [0x49a8cc]
mov dword [ecx + 0x133c], 1
xor ecx, ecx
mov word [eax - 2], cx
mov edx, dword [0x49a8cc]
lea ecx, [ebp - 0x1c]
add edx, 0x1328
movzx eax, word [ecx]
mov word [edx], ax
add ecx, edi
add edx, edi
cmp ax, bx
jne 0x46b652
mov edx, dword [0x49a8cc]
lea ecx, [ebp - 0x30]
add edx, 0x1340
movzx eax, word [ecx]
mov word [edx], ax
add ecx, edi
add edx, edi
cmp ax, bx
jne 0x46b670
push dword [0x49a8cc]
call fcn.0046a064
pop ecx
pop edi
xor eax, eax
pop esi
inc eax
pop ebx
leave
ret