Function at 0x1005179
Capabilities:
Read file via mapping

Disassembly:
push 0x280
push 0x1001800
call fcn.01007568
mov eax, dword [0x1009604]
mov dword [ebp - 0x1c], eax
mov edi, dword [ebp + 8]
mov dword [ebp - 0x240], edi
xor ebx, ebx
mov dword [ebp - 0x234], ebx
mov dword [ebp - 0x250], ebx
mov dword [ebp - 0x238], ebx
mov dword [ebp - 0x248], ebx
mov dword [ebp - 0x230], ebx
mov eax, dword [0x100a480]
cmp eax, 0xffffffff
jne 0x10051c9
push edi
jmp 0x10052a0
lea ecx, [ebp - 0x290]
push ecx
push eax
call dword [0x10010b0]
mov esi, dword [ebp - 0x26c]
mov dword [ebp - 0x254], esi
cmp eax, ebx
jne 0x10051f2
push edi
call fcn.01004e20
jmp 0x10057e1
cmp esi, 0x40000000
jae 0x10057c7
cmp dword [ebp - 0x270], ebx
jne 0x10057c7
push dword [0x100ab84]
call dword [0x100118c]
cmp esi, ebx
je 0x100525e
xor edi, edi
mov dword [ebp - 0x23c], edi
push ebx
push esi
push ebx
push 2
push ebx
push dword [0x100a480]
call dword [0x10010b4]
mov dword [ebp - 0x25c], eax
cmp eax, ebx
je 0x1005277
push esi
push ebx
push ebx
push 4
push eax
call dword [0x1001168]
mov dword [ebp - 0x23c], eax
push dword [ebp - 0x25c]
call dword [0x10010f8]
jmp 0x1005271
lea eax, [ebp - 0x24c]
mov dword [ebp - 0x23c], eax
mov word [ebp - 0x24c], bx
mov edi, dword [ebp - 0x23c]
push dword [0x100a480]
call dword [0x10010f8]
or dword [0x100a480], 0xffffffff
cmp edi, ebx
jne 0x10052aa
push dword [0x100ab88]
call dword [0x100118c]
push dword [ebp - 0x240]
call fcn.01004e20
jmp 0x10057f4
mov dword [ebp - 4], ebx
mov dword [ebp - 0x244], edi
mov eax, dword [ebp + 0xc]
cmp eax, 0xffffffff
jne 0x1005471
movzx eax, word [edi]
cmp eax, 0xbbef
je 0x1005305
cmp eax, 0xfeff
je 0x10052f4
cmp eax, 0xfffe
jne 0x1005332
mov dword [ebp - 0x238], 1
mov dword [ebp - 0x22c], 2
mov ebx, esi
shr ebx, 1
jmp 0x1005524
xor eax, eax
inc eax
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x22c], eax
jmp 0x10052eb
cmp esi, 2
jbe 0x1005332
cmp byte [edi + 2], 0xbf
jne 0x1005332
mov dword [ebp - 0x258], 1
mov dword [ebp - 0x230], 0xfde9
push 3
pop eax
mov dword [ebp - 0x22c], eax
jmp 0x10054ca
push esi
push edi
call fcn.010070b1
mov dword [ebp - 0x238], eax
cmp eax, ebx
je 0x1005356
mov dword [ebp - 0x22c], 1
mov ebx, esi
shr ebx, 1
jmp 0x1005525
push esi
push edi
call fcn.01007059
mov dword [ebp - 0x258], eax
cmp eax, ebx
je 0x100547e
mov dword [ebp - 0x22c], 3
mov dword [ebp - 0x230], 0xfde9
mov ebx, dword [ebp - 0x228]
xor eax, eax
cmp dword [ebp - 0x238], eax
jne 0x10053af
push eax
push eax
push esi
push dword [ebp - 0x244]
push eax
push dword [ebp - 0x230]
call dword [0x1001164]
mov ebx, eax
mov dword [ebp - 0x228], ebx
xor eax, eax
push eax
push eax
push 0xb
push dword [0x1009838]
mov esi, dword [0x1001240]
call esi
push 0
push 0
push 0xb1
push dword [0x1009838]
call esi
push 0
push 0
push 0xb7
push dword [0x1009838]
call esi
push 2
lea eax, [ebx + ebx + 2]
push eax
push dword [0x100ab8c]
call dword [0x1001148]
mov dword [ebp - 0x248], eax
test eax, eax
jne 0x1005530
push dword [ebp - 0x240]
lea eax, [ebp - 0x224]
push eax
call dword [0x10010fc]
xor ebx, ebx
push ebx
call fcn.01004cff
push dword [0x100ab88]
call dword [0x100118c]
push 0x30
lea eax, [ebp - 0x224]
push eax
push dword [0x1009050]
push dword [0x1009054]
push dword [0x1009830]
call fcn.01001f70
lea eax, [ebp - 0x24c]
cmp edi, eax
je 0x100545c
push edi
call dword [0x1001160]
push ebx
push ebx
push 0xb
push dword [0x1009838]
call esi
or dword [ebp - 4], 0xffffffff
jmp 0x10057f4
dec eax
je 0x1005500
dec eax
je 0x10054e0
dec eax
je 0x100548f
mov dword [ebp - 0x22c], ebx
mov dword [ebp - 0x230], ebx
jmp 0x100537f
mov dword [ebp - 0x258], 1
mov dword [ebp - 0x230], 0xfde9
push 3
pop eax
mov dword [ebp - 0x22c], eax
cmp esi, 2
jbe 0x100537f
cmp word [edi], 0xbbef
jne 0x100537f
cmp byte [edi + 2], 0xbf
jne 0x100537f
lea ecx, [edi + 3]
mov dword [ebp - 0x244], ecx
sub esi, eax
mov dword [ebp - 0x254], esi
jmp 0x100537f
xor eax, eax
inc eax
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x22c], eax
mov ebx, esi
shr ebx, 1
mov dword [ebp - 0x228], ebx
cmp word [edi], 0xfffe
jmp 0x100551e
xor eax, eax
inc eax
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x22c], eax
mov ebx, esi
shr ebx, 1
mov dword [ebp - 0x228], ebx
cmp word [edi], 0xfeff
jne 0x1005385
dec ebx
mov dword [ebp - 0x228], ebx
jmp 0x1005385
push eax
call dword [0x10010f0]
mov dword [ebp - 0x234], eax
cmp dword [ebp - 0x238], 0
je 0x100558c
mov cx, word [edi]
cmp cx, 0xfeff
jne 0x1005555
lea esi, [edi + 2]
jmp 0x100556b
cmp cx, 0xfffe
jne 0x1005569
push ebx
lea ecx, [edi + 2]
push ecx
push eax
call fcn.01004b65
jmp 0x10055b0
mov esi, edi
lea ecx, [ebx + ebx]
mov edi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x23c]
mov esi, dword [0x1001240]
jmp 0x10055b0
push ebx
push eax
push dword [ebp - 0x254]
push dword [ebp - 0x244]
push 0
push dword [ebp - 0x230]
call dword [0x1001164]
mov ebx, eax
mov dword [ebp - 0x228], ebx
mov eax, dword [ebp - 0x234]
mov ecx, dword [ebp - 0x22c]
mov dword [0x1009030], ecx
or dword [ebp - 4], 0xffffffff
jmp 0x1005606
lea ecx, [ebp - 0x24c]
cmp edi, ecx
je 0x100561d
push edi
call dword [0x1001160]
mov eax, dword [ebp - 0x234]
xor edi, edi
cmp eax, edi
je 0x1005675
mov ecx, eax
cmp ebx, edi
jbe 0x100563a
mov edx, ebx
cmp word [ecx], di
jne 0x1005635
mov word [ecx], 0x20
inc ecx
inc ecx
dec edx
jne 0x100562b
mov word [eax + ebx*2], di
mov cx, word [eax]
inc eax
inc eax
cmp cx, 0x2e
jne 0x100566f
mov cx, word [eax]
inc eax
inc eax
cmp cx, 0x4c
jne 0x100566f
mov cx, word [eax]
inc eax
inc eax
cmp cx, 0x4f
jne 0x100566f
cmp word [eax], 0x47
mov dword [ebp - 0x250], 1
je 0x1005675
mov dword [ebp - 0x250], edi
cmp dword [ebp - 0x248], edi
je 0x1005694
push dword [ebp - 0x248]
call dword [0x10010e8]
mov eax, dword [ebp - 0x248]
mov dword [0x100ab8c], eax
push dword [ebp - 0x240]
push 0x100a900
call dword [0x10010fc]
push dword [ebp - 0x240]
call fcn.01002a55
mov dword [0x100901c], edi
mov dword [0x1009848], 1
push edi
push dword [0x100ab8c]
push 0xbc
push dword [0x1009838]
call esi
cmp dword [0x1009848], 2
jne 0x1005726
push dword [0x100ab88]
call dword [0x100118c]
mov dword [0x1009848], edi
push 0x30
push dword [ebp - 0x240]
push dword [0x1009050]
push dword [0x1009054]
push dword [0x1009830]
call fcn.01001f70
push edi
call fcn.01004cff
push edi
push 1
push 0xb
push dword [0x1009838]
call esi
jmp 0x10057f4
mov dword [0x1009848], edi
push edi
push edi
push 0xc5
push dword [0x1009838]
call dword [0x10012a4]
cmp dword [ebp - 0x250], edi
je 0x100576c
push ebx
push ebx
push 0xb1
push dword [0x1009838]
call esi
push edi
push edi
push 0xb7
push dword [0x1009838]
call esi
push 1
call fcn.01006f10
xor ebx, ebx
inc ebx
push ebx
push edi
push 0xbe
push 0x115
push dword [0x1009838]
call esi
push eax
push ebx
push dword [0x1009830]
call dword [0x1001200]
push edi
push ebx
push 0xb
push dword [0x1009838]
call esi
push ebx
push edi
push dword [0x1009838]
call dword [fcn.01001224]
push dword [0x1009838]
call dword [0x10011fc]
push dword [0x100ab88]
call dword [0x100118c]
mov eax, ebx
jmp 0x10057f6
push 0x30
push edi
push dword [0x1009050]
push dword [0x1009054]
push dword [0x1009830]
call fcn.01001f70
push dword [0x100a480]
call dword [0x10010f8]
or dword [0x100a480], 0xffffffff
xor eax, eax
mov ecx, dword [ebp - 0x1c]
call fcn.01007147
call fcn.010075a3
ret 8