Function at 0x40d8c0
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x88
mov edi, dword [esp + 0xa4]
mov ebp, dword [esp + 0xa0]
mov eax, dword [0x8e4a3c]
xor eax, esp
mov dword [esp + 0x84], eax
movq xmm0, qword [edi]
movq qword [esp + 0x44], xmm0
lea esi, [esp + 0x4c]
push esi
call fcn.00480110
add esp, 4
mov byte [esp + 0x4f], 0xff
movzx eax, word [ebp + 0x54]
mov word [esp + 0x50], ax
mov word [esp + 0x6c], 0
cmp dword [ebp + 0x50], 0
lea ebx, [esp + 0x44]
je 0x40d9dd
mov word [esp + 0x4c], 5
push ebx
push esi
push dword [esp + 0xa4]
call fcn.00480170
add esp, 0xc
mov word [esp + 0x4c], 0
test byte [ebp + 0x50], 1
jne 0x40db1d
mov eax, dword [edi]
movd xmm0, eax
mov dword [esp + 0x44], eax
paddw xmm0, xmmword [0x4f8140]
movd dword [esp + 0x48], xmm0
push ebx
push esi
mov eax, dword [esp + 0xa4]
push eax
call fcn.00480170
add esp, 0xc
cmp byte [ebp + 0x4c], 0
movzx edx, word [edi]
mov word [esp + 0x44], dx
movzx eax, word [edi + 2]
mov word [esp + 0x46], ax
mov ecx, 0x4e70e0
mov esi, 0x4ec5d0
cmove esi, ecx
mov edi, 0x4e9108
mov ecx, 0x4ee6ac
cmove ecx, edi
mov edi, dword [esi]
shr edi, 0xa
and edi, 0x7ff
add edx, edi
dec edx
mov word [esp + 0x48], dx
mov edx, dword [ecx]
shr edx, 0x15
add eax, edx
dec eax
mov word [esp + 0x4a], ax
push 0
push 0
push ecx
push ebx
mov edi, dword [esp + 0xac]
push edi
call fcn.00402270
add esp, 0x14
jmp 0x40db67
mov word [esp + 0x4c], 0
push ebx
push esi
push dword [esp + 0xa4]
call fcn.00480170
add esp, 0xc
cmp byte [ebp + 0x4c], 0
movzx esi, word [edi]
movzx edi, word [edi + 4]
je 0x40dc55
cmp si, di
mov edx, dword [esp + 0xa4]
jge 0x40da93
mov ebp, ebx
mov eax, dword [0x4ee6ac]
mov ecx, eax
shr ecx, 0xa
and ecx, 0x7ff
shr eax, 0x15
dec eax
movzx ecx, cx
mov dword [esp + 4], ecx
cwde
mov dword [esp], eax
nop word [eax + eax]
mov word [esp + 0x44], si
mov eax, dword [esp + 4]
add eax, esi
cmp ax, di
cmovge eax, edi
mov word [esp + 0x48], ax
movzx eax, word [edx + 2]
mov word [esp + 0x46], ax
add eax, dword [esp]
mov word [esp + 0x4a], ax
push 0
push 0
push 0x4ee6ac
push ebp
push dword [esp + 0xac]
mov ebx, edx
call fcn.00402270
mov edx, ebx
add esp, 0x14
add si, word [esp + 0x48]
sub si, word [esp + 0x44]
cmp si, di
jl 0x40da40
movzx esi, word [edx + 2]
movzx edi, word [edx + 6]
cmp si, di
jge 0x40e3a4
mov eax, dword [0x4ec5d0]
mov ecx, eax
shr ecx, 0xa
and ecx, 0x7ff
shr eax, 0x15
movzx ebx, cx
movzx ebp, ax
nop dword [eax]
mov eax, dword [esp + 0xa4]
movzx eax, word [eax]
mov word [esp + 0x44], ax
add eax, ebx
dec eax
mov word [esp + 0x48], ax
mov word [esp + 0x46], si
lea eax, [esi + ebp]
dec eax
cmp ax, di
cmovge eax, edi
mov word [esp + 0x4a], ax
push 0
push 0
push 0x4ec5d0
lea eax, [esp + 0x50]
push eax
push dword [esp + 0xac]
call fcn.00402270
add esp, 0x14
add si, word [esp + 0x4a]
sub si, word [esp + 0x46]
inc esi
cmp si, di
jl 0x40dac0
jmp 0x40e3a4
cmp byte [ebp + 0x4c], 0
mov eax, 0x4e91d4
mov esi, 0x4ee778
cmove esi, eax
movzx eax, word [edi]
mov word [esp + 0x44], ax
movzx ecx, word [edi + 2]
mov word [esp + 0x46], cx
mov edx, dword [esi]
mov edi, edx
shr edi, 0xa
and edi, 0x7ff
add eax, edi
dec eax
mov word [esp + 0x48], ax
shr edx, 0x15
lea eax, [ecx + edx]
dec eax
mov word [esp + 0x4a], ax
mov edi, dword [esp + 0x9c]
push 0
push 0
push esi
push ebx
push edi
call fcn.00402270
add esp, 0x14
movsx esi, word [esp + 0x48]
mov edx, edi
movsx edi, word [esp + 0x4a]
test byte [ebp + 0x50], 2
jne 0x40dbf2
mov ebp, dword [esp + 0xa4]
movzx eax, word [ebp + 4]
mov ecx, eax
add ecx, 0xfffffffc
mov word [esp + 0x44], cx
movzx ecx, word [ebp + 2]
mov word [esp + 0x46], cx
mov word [esp + 0x48], ax
add ecx, 4
mov word [esp + 0x4a], cx
push ebx
lea eax, [esp + 0x50]
push eax
push edx
mov ebp, edx
call fcn.00480170
mov ecx, dword [esp + 0xac]
add esp, 0xc
cmp byte [ecx + 0x4c], 0
mov eax, dword [esp + 0xa4]
movzx eax, word [eax + 4]
je 0x40dead
inc eax
mov word [esp + 0x44], ax
mov word [esp + 0xe], 0xffff
jmp 0x40df3f
cmp byte [ebp + 0x4c], 0
mov ecx, 0x4e92a0
mov eax, 0x4ee844
cmove eax, ecx
mov ecx, dword [esp + 0xa4]
mov ebp, edx
movzx edx, word [ecx + 4]
mov ecx, dword [eax]
mov ebx, ecx
shr ebx, 0xa
and ebx, 0x7ff
neg ebx
add ebx, edx
inc ebx
mov word [esp + 0x44], bx
mov ebx, dword [esp + 0xa4]
movzx ebx, word [ebx + 2]
mov word [esp + 0x46], bx
mov word [esp + 0x48], dx
shr ecx, 0x15
add ecx, ebx
dec ecx
lea ebx, [esp + 0x44]
mov word [esp + 0x4a], cx
push 0
push 0
push eax
jmp 0x40df24
cmp si, di
mov edx, dword [esp + 0xa4]
jge 0x40dce3
mov ebp, ebx
mov eax, dword [0x4e9108]
mov ecx, eax
shr ecx, 0xa
and ecx, 0x7ff
shr eax, 0x15
dec eax
movzx ecx, cx
mov dword [esp + 4], ecx
cwde
mov dword [esp], eax
nop word cs:[eax + eax]
mov word [esp + 0x44], si
mov eax, dword [esp + 4]
add eax, esi
cmp ax, di
cmovge eax, edi
mov word [esp + 0x48], ax
movzx eax, word [edx + 2]
mov word [esp + 0x46], ax
add eax, dword [esp]
mov word [esp + 0x4a], ax
push 0
push 0
push 0x4e9108
push ebp
push dword [esp + 0xac]
mov ebx, edx
call fcn.00402270
mov edx, ebx
add esp, 0x14
add si, word [esp + 0x48]
sub si, word [esp + 0x44]
cmp si, di
jl 0x40dc90
movzx esi, word [edx + 2]
movzx ebp, word [edx + 6]
cmp si, bp
jge 0x40dd77
mov eax, dword [0x4e70e0]
mov ecx, eax
shr ecx, 0xa
and ecx, 0x7ff
shr eax, 0x15
movzx ebx, cx
movzx edi, ax
nop dword [eax]
mov eax, dword [esp + 0xa4]
movzx eax, word [eax]
mov word [esp + 0x44], ax
add eax, ebx
dec eax
mov word [esp + 0x48], ax
mov word [esp + 0x46], si
lea eax, [esi + edi]
dec eax
cmp ax, bp
cmovge eax, ebp
mov word [esp + 0x4a], ax
push 0
push 0
push 0x4e70e0
lea eax, [esp + 0x50]
push eax
push dword [esp + 0xac]
call fcn.00402270
add esp, 0x14
add si, word [esp + 0x4a]
sub si, word [esp + 0x46]
inc esi
cmp si, bp
jl 0x40dd10
mov eax, dword [esp + 0xa4]
movzx esi, word [eax + 2]
movzx ebp, word [eax + 6]
cmp si, bp
mov edx, dword [esp + 0x9c]
lea ebx, [esp + 0x44]
mov ecx, dword [esp + 0xa4]
jge 0x40de0d
mov eax, dword [0x4e7d94]
mov edi, eax
shr edi, 0xa
and edi, 0x7ff
shr eax, 0x15
neg edi
mov dword [esp + 4], edi
movzx eax, ax
mov dword [esp], eax
nop dword [eax]
movzx eax, word [ecx + 4]
mov ecx, dword [esp + 4]
add ecx, eax
inc ecx
mov word [esp + 0x44], cx
mov word [esp + 0x48], ax
mov word [esp + 0x46], si
mov eax, dword [esp]
add eax, esi
dec eax
cmp ax, bp
cmovge eax, ebp
mov word [esp + 0x4a], ax
push 0
push 0
push 0x4e7d94
push ebx
push edx
mov edi, ebx
mov ebx, edx
call fcn.00402270
mov edx, ebx
mov ebx, edi
mov ecx, dword [esp + 0xb8]
add esp, 0x14
add si, word [esp + 0x4a]
sub si, word [esp + 0x46]
inc esi
cmp si, bp
jl 0x40ddb0
movzx esi, word [ecx]
movzx edi, word [ecx + 4]
cmp si, di
jge 0x40e3a4
mov eax, dword [0x4e6294]
mov ecx, eax
shr ecx, 0xa
and ecx, 0x7ff
shr eax, 0x15
mov edx, 1
sub edx, eax
movzx ebx, cx
movsx ebp, dx
jmp 0x40de89
mov eax, dword [esp + 0xa4]
movzx eax, word [eax + 6]
mov ecx, eax
add ecx, ebp
mov word [esp + 0x46], cx
mov word [esp + 0x4a], ax
push 0
push 0
push 0x4e6294
lea eax, [esp + 0x50]
push eax
push dword [esp + 0xac]
call fcn.00402270
add esp, 0x14
add si, word [esp + 0x48]
sub si, word [esp + 0x44]
cmp si, di
jge 0x40e3a4
mov word [esp + 0x44], si
lea eax, [ebx + esi]
mov word [esp + 0x48], ax
cmp ax, di
jle 0x40de40
mov eax, dword [esp + 0xa4]
movzx eax, word [eax + 4]
mov word [esp + 0x48], ax
jmp 0x40de40
movzx ecx, ax
mov edx, dword [0x4e7d94]
shr edx, 0xa
and edx, 0x7ff
sub ecx, edx
inc ecx
mov word [esp + 0x44], cx
mov edx, dword [esp + 0xa4]
movzx ebx, word [edx + 2]
mov word [esp + 0x46], bx
mov word [esp + 0x48], ax
mov edx, dword [0x4e9108]
mov ebp, edx
shr ebp, 0x15
add ebx, ebp
dec ebx
mov ebp, dword [esp + 0x9c]
mov word [esp + 0x4a], bx
lea ebx, [esp + 0x44]
shr edx, 0xa
and edx, 0x7ff
sub eax, ecx
inc eax
cwde
sub edx, eax
push 0
push edx
push 0x4e9108
push ebx
push ebp
call fcn.00402270
add esp, 0x14
push 0
push 0
push 0x4e7d94
push ebx
push ebp
call fcn.00402270
mov ecx, dword [esp + 0xb4]
add esp, 0x14
movzx eax, word [esp + 0x4a]
mov word [esp + 0xe], ax
movsx eax, word [esp + 0x44]
mov dword [esp + 4], eax
test byte [ecx + 0x50], 4
jne 0x40dfaf
mov ecx, dword [esp + 0xa4]
movzx eax, word [ecx]
mov word [esp + 0x44], ax
movzx ecx, word [ecx + 6]
mov edx, ecx
add edx, 0xfffffffc
mov word [esp + 0x46], dx
add eax, 4
mov word [esp + 0x48], ax
mov word [esp + 0x4a], cx
push ebx
lea eax, [esp + 0x50]
push eax
push ebp
call fcn.00480170
mov ebp, dword [esp + 0xb0]
mov edx, dword [esp + 0xac]
add esp, 0xc
cmp byte [edx + 0x4c], 0
movzx eax, word [ebp]
je 0x40e00c
dec eax
mov word [esp + 0x48], ax
movzx ecx, word [ebp + 6]
inc ecx
jmp 0x40e09e
cmp byte [ecx + 0x4c], 0
mov ecx, 0x4e6360
mov eax, 0x4eb484
cmove eax, ecx
mov edx, dword [esp + 0xa4]
movzx ecx, word [edx]
mov word [esp + 0x44], cx
movzx edx, word [edx + 6]
mov ebx, dword [eax]
mov ebp, ebx
shr ebp, 0x15
neg ebp
add ebp, edx
inc ebp
mov word [esp + 0x46], bp
mov ebp, dword [esp + 0x9c]
shr ebx, 0xa
and ebx, 0x7ff
add ecx, ebx
dec ecx
lea ebx, [esp + 0x44]
mov word [esp + 0x48], cx
mov word [esp + 0x4a], dx
push 0
push 0
push eax
jmp 0x40e083
mov word [esp + 0x44], ax
mov edx, eax
movzx eax, word [ebp + 6]
mov ecx, dword [0x4e6294]
shr ecx, 0x15
neg ecx
add ecx, eax
inc ecx
mov word [esp + 0x46], cx
mov ebx, dword [0x4e70e0]
mov ecx, ebx
shr ecx, 0xa
and ecx, 0x7ff
add ecx, edx
dec ecx
mov word [esp + 0x48], cx
mov word [esp + 0x4a], ax
push 0
push 0
push 0x4e6294
lea eax, [esp + 0x50]
push eax
mov ebp, dword [esp + 0xac]
push ebp
call fcn.00402270
add esp, 0x14
movzx eax, word [esp + 0x4a]
sub ax, word [esp + 0x46]
shr ebx, 0x15
inc eax
cwde
sub ebx, eax
push ebx
lea ebx, [esp + 0x48]
push 0
push 0x4e70e0
push ebx
push ebp
call fcn.00402270
mov edx, dword [esp + 0xb4]
add esp, 0x14
movzx ecx, word [esp + 0x46]
movzx eax, word [esp + 0x48]
inc edi
movsx ebp, cx
dec ebp
mov dword [esp], ebp
test byte [edx + 0x50], 8
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], ecx
jne 0x40e103
mov ebp, dword [esp + 0xa4]
mov eax, dword [ebp + 4]
movd xmm0, eax
paddw xmm0, xmmword [0x4f8150]
movd dword [esp + 0x44], xmm0
mov dword [esp + 0x48], eax
push ebx
lea eax, [esp + 0x50]
push eax
mov eax, dword [esp + 0xa4]
push eax
call fcn.00480170
mov edx, dword [esp + 0xac]
add esp, 0xc
cmp byte [edx + 0x4c], 0
movzx ecx, word [ebp + 4]
je 0x40e131
inc ecx
mov word [esp + 0x44], cx
jmp 0x40e11e
cmp byte [edx + 0x4c], 0
mov ebp, dword [esp + 0xa4]
movzx eax, word [ebp + 4]
je 0x40e1b8
inc eax
mov word [esp + 0x44], ax
movzx eax, word [ebp + 6]
inc eax
mov dword [esp + 8], eax
mov word [esp + 0x46], ax
jmp 0x40e21c
movzx edx, cx
mov eax, dword [0x4e7d94]
mov ebx, eax
shr ebx, 0xa
and ebx, 0x7ff
sub edx, ebx
inc edx
mov word [esp + 0x44], dx
movzx edx, word [ebp + 6]
mov ebx, dword [0x4e6294]
mov ebp, ebx
shr ebp, 0x15
neg ebp
add ebp, edx
inc ebp
mov word [esp + 0x46], bp
mov word [esp + 0x48], cx
mov word [esp + 0x4a], dx
shr eax, 0x15
sub edx, ebp
inc edx
movsx ecx, dx
sub eax, ecx
push eax
push 0
push 0x4e7d94
lea ebp, [esp + 0x50]
push ebp
push dword [esp + 0xac]
call fcn.00402270
add esp, 0x14
shr ebx, 0xa
movzx eax, word [esp + 0x48]
sub ax, word [esp + 0x44]
and ebx, 0x7ff
inc eax
cwde
sub ebx, eax
push 0
push ebx
push 0x4e6294
push ebp
jmp 0x40e1fd
movzx edx, ax
mov ecx, dword [0x4e642c]
mov ebx, ecx
shr ebx, 0xa
and ebx, 0x7ff
sub edx, ebx
inc edx
mov word [esp + 0x44], dx
movzx edx, word [ebp + 6]
shr ecx, 0x15
neg ecx
add ecx, edx
inc ecx
mov word [esp + 0x46], cx
mov word [esp + 0x48], ax
mov word [esp + 0x4a], dx
push 0
push 0
push 0x4e642c
lea eax, [esp + 0x50]
push eax
push dword [esp + 0xac]
call fcn.00402270
mov edx, dword [esp + 0xb4]
add esp, 0x14
movzx eax, word [esp + 0x46]
mov dword [esp + 8], eax
inc esi
mov eax, dword [esp + 4]
lea ebx, [eax - 1]
movzx eax, byte [edx + 0x4c]
test al, al
mov ecx, 0x4e70e0
mov edx, 0x4ec5d0
cmove edx, ecx
movsx ebp, word [esp + 0x44]
mov ecx, dword [esp]
cmp edi, ecx
mov dword [esp + 0x10], ebp
jge 0x40e2e5
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], edx
mov ebp, dword [edx]
mov eax, ebp
shr eax, 0xa
and eax, 0x7ff
shr ebp, 0x15
movzx ebx, ax
jmp 0x40e2a7
mov word [esp + 0x4a], ax
push 0
push 0
push dword [esp + 0x1c]
lea eax, [esp + 0x50]
push eax
push dword [esp + 0xac]
call fcn.00402270
mov ecx, dword [esp + 0x14]
add esp, 0x14
movzx eax, word [esp + 0x4a]
sub ax, word [esp + 0x46]
inc eax
cwde
add edi, eax
cmp edi, ecx
jge 0x40e2d2
mov eax, dword [esp + 0xa4]
movzx eax, word [eax]
mov word [esp + 0x44], ax
add eax, ebx
dec eax
mov word [esp + 0x48], ax
mov word [esp + 0x46], di
lea eax, [edi + ebp]
dec eax
cmp word [esp + 0x18], ax
jg 0x40e270
mov eax, ecx
jmp 0x40e270
mov eax, dword [esp + 0xa0]
movzx eax, byte [eax + 0x4c]
mov ebp, dword [esp + 0x10]
mov ebx, dword [esp + 0x1c]
test al, al
mov ecx, 0x4e9108
mov edi, 0x4ee6ac
cmove edi, ecx
cmp esi, ebx
jge 0x40e392
mov edx, ebx
mov dword [esp], edi
mov eax, dword [edi]
mov ebx, eax
shr ebx, 0xa
and ebx, 0x7ff
shr eax, 0x15
dec eax
movsx ebp, ax
jmp 0x40e36e
mov word [esp + 0x48], ax
mov eax, dword [esp + 0xa4]
movzx eax, word [eax + 2]
mov word [esp + 0x46], ax
add eax, ebp
mov word [esp + 0x4a], ax
push 0
push 0
push dword [esp + 8]
lea eax, [esp + 0x50]
push eax
push dword [esp + 0xac]
mov edi, edx
call fcn.00402270
mov edx, edi
add esp, 0x14
movsx eax, word [esp + 0x48]
movsx ecx, word [esp + 0x44]
add esi, eax
sub esi, ecx
cmp esi, edi
jge 0x40e383
mov word [esp + 0x44], si
lea eax, [ebx + esi]
movsx ecx, ax
cmp ecx, dword [esp + 4]
jl 0x40e320
mov eax, edx
jmp 0x40e320
mov eax, dword [esp + 0xa0]
movzx eax, byte [eax + 0x4c]
mov ebp, dword [esp + 0x10]
xor ecx, ecx
mov esi, 0x4e7d94
test al, al
cmovne esi, ecx
je 0x40e460
mov ebx, dword [esp + 0xa0]
cmp byte [ebx + 4], 0
mov ebp, dword [esp + 0x9c]
mov esi, dword [esp + 0xa4]
je 0x40e6b0
mov eax, dword [ebx]
mov esi, dword [ebx + 0x28]
test esi, esi
cmove esi, eax
movsx ebp, word [eax + 8]
lea edi, [ebx + 0x2c]
cmp byte [ebx + 0x2c], 0
mov dword [esp + 0x18], esi
mov dword [esp + 4], edi
je 0x40e4eb
push edi
call fcn.004d07c0
add esp, 4
push 0
push 0
push esi
push eax
push edi
call fcn.004b24b0
add esp, 0x14
mov ecx, eax
mov edx, dword [esp + 0xa4]
movzx eax, word [edx + 4]
sub ax, word [edx]
inc eax
cwde
shl eax, 3
lea eax, [eax + eax*8]
mov edx, 0x51eb851f
imul edx
mov edi, edx
mov ebx, dword [esp + 0xa0]
mov eax, edx
shr eax, 0x1f
sar edi, 5
add edi, eax
movsx eax, cx
mov dword [esp + 0x10], eax
add eax, 4
cmp edi, eax
cmovle edi, eax
movsx eax, word [esi + 8]
mov esi, dword [esp + 0xa4]
mov dword [esp + 8], eax
add ebp, eax
add ebp, 2
mov ax, 2
mov dword [esp + 0x14], eax
jmp 0x40e50c
movsx edi, word [esp + 0xe]
movsx ebx, word [esp + 8]
inc edi
dec ebx
mov al, 1
cmp edi, ebx
jge 0x40e78e
mov ebp, dword [esp + 0x9c]
jmp 0x40e4ae
mov word [esp + 0x4a], ax
push 0
push 0
push esi
lea eax, [esp + 0x50]
push eax
push ebp
call fcn.00402270
add esp, 0x14
movzx eax, word [esp + 0x4a]
sub ax, word [esp + 0x46]
inc eax
cwde
add edi, eax
cmp edi, ebx
jge 0x40e778
mov eax, dword [esp + 0xa4]
movzx ecx, word [eax + 4]
mov eax, dword [esi]
mov edx, eax
shr edx, 0xa
and edx, 0x7ff
neg edx
add edx, ecx
inc edx
mov word [esp + 0x44], dx
mov word [esp + 0x48], cx
mov word [esp + 0x46], di
shr eax, 0x15
add eax, edi
dec eax
cmp word [esp + 8], ax
jg 0x40e480
mov eax, ebx
jmp 0x40e480
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
xor edi, edi
mov dword [esp + 8], 0
mov esi, dword [esp + 0xa4]
lea eax, [ebx + 4]
mov dword [esp], eax
lea eax, [esp + 0x24]
push eax
call fcn.0047d770
add esp, 4
movzx eax, word [ebx + 0x24]
mov word [esp + 0x30], ax
mov byte [esp + 0x40], 2
mov eax, dword [ebx]
mov dword [esp + 0x24], eax
movzx ecx, word [esi]
mov word [esp + 0x44], cx
movzx ecx, word [esi + 4]
mov word [esp + 0x48], cx
movzx ecx, word [esi + 2]
movzx edx, word [esi + 6]
sub edx, ecx
inc edx
movsx edx, dx
sub edx, ebp
mov ebp, edx
shr ebp, 0x1f
add ebp, edx
shr ebp, 1
add ebp, ecx
mov word [esp + 0x46], bp
add bp, word [eax + 8]
mov word [esp + 0x4a], bp
cmp byte [ebx + 0x4c], 0
lea ebp, [esp + 0x44]
je 0x40e586
movzx eax, byte [ebx + 0x4e]
push eax
push eax
push ebp
call fcn.004ad160
add esp, 0xc
push 0
push dword [esp + 4]
push ebp
lea eax, [esp + 0x30]
push eax
mov ebp, dword [esp + 0xac]
push ebp
call fcn.0047d7c0
add esp, 0x14
mov eax, dword [esp + 4]
cmp byte [eax], 0
je 0x40e6b0
mov ebx, dword [esp + 0x14]
add bx, word [esp + 0x4a]
movzx eax, word [esi]
movzx ecx, word [esi + 4]
sub ecx, eax
inc ecx
movsx ecx, cx
movsx edx, di
sub ecx, edx
mov edx, ecx
shr edx, 0x1f
add edx, ecx
shr edx, 1
add edx, eax
mov word [esp + 0x44], dx
lea eax, [edi + edx]
dec eax
mov word [esp + 0x48], ax
mov word [esp + 0x46], bx
mov ebp, dword [esp + 8]
lea eax, [ebx + ebp]
mov word [esp + 0x4a], ax
lea edi, [esp + 0x4c]
push edi
call fcn.00480110
add esp, 4
mov byte [esp + 0x4f], 0xff
mov word [esp + 0x50], 0
mov word [esp + 0x6c], 0
mov word [esp + 0x4c], 5
lea esi, [esp + 0x44]
push esi
push edi
mov edi, dword [esp + 0xac]
push dword [esp + 0xa4]
call fcn.00480170
add esp, 0xc
movzx esi, word [edi]
movzx ecx, word [edi + 4]
sub ecx, esi
inc ecx
movsx ecx, cx
mov eax, dword [esp + 0x10]
sub ecx, eax
mov edx, ecx
shr edx, 0x1f
add edx, ecx
shr edx, 1
add edx, esi
mov word [esp + 0x44], dx
add eax, edx
dec eax
mov word [esp + 0x48], ax
mov edx, dword [esp + 0x18]
movsx eax, word [edx + 8]
sub ebp, eax
mov ecx, ebp
shr ecx, 0x1f
add ecx, ebp
mov ebp, dword [esp + 0x9c]
shr ecx, 1
add ecx, ebx
mov word [esp + 0x46], cx
add ecx, eax
mov word [esp + 0x4a], cx
mov dword [esp + 0x24], edx
push 0
push dword [esp + 8]
lea eax, [esp + 0x4c]
push eax
mov esi, edi
lea eax, [esp + 0x30]
push eax
push ebp
call fcn.0047d7c0
mov ebx, dword [esp + 0xb4]
add esp, 0x14
cmp byte [ebx + 0x4d], 0
je 0x40e75f
mov eax, dword [0x5ef7f0]
mov ecx, dword [esi + 2]
movd xmm0, ecx
shr ecx, 0x10
sub ecx, eax
add ecx, 0xfffffffb
mov word [esp + 0x44], cx
paddw xmm0, xmmword [0x4f8160]
movd dword [esp + 0x46], xmm0
movd ecx, xmm0
lea eax, [eax + ecx - 1]
mov word [esp + 0x4a], ax
lea esi, [esp + 0x4c]
push esi
call fcn.00480110
add esp, 4
mov byte [esp + 0x4f], 0xff
push 0
call fcn.004adb00
add esp, 4
mov word [esp + 0x50], ax
mov word [esp + 0x6c], 1
mov word [esp + 0x4c], 0
lea edi, [esp + 0x44]
push edi
push esi
push ebp
call fcn.00480170
add esp, 0xc
lea esi, [esp + 0x24]
push esi
call fcn.0047d770
add esp, 4
mov word [esp + 0x30], 0xffff
mov byte [esp + 0x40], 2
mov dword [esp + 0x24], 0x5ef7e8
push 0
push 0x657e5a
push edi
push esi
push ebp
call fcn.0047d7c0
add esp, 0x14
mov ecx, dword [esp + 0x84]
xor ecx, esp
call fcn.004c0e60
add esp, 0x88
pop esi
pop edi
pop ebx
pop ebp
ret
xor esi, esi
mov eax, dword [esp + 0xa0]
cmp byte [eax + 0x4c], 0
sete al
mov ebp, dword [esp + 0x10]
jne 0x40e793
mov esi, 0x4e6294
test al, al
je 0x40e3a4
movsx edi, word [esp + 0x20]
inc edi
lea ebx, [ebp - 1]
jmp 0x40e7f9
mov word [esp + 0x48], cx
mov ecx, dword [esp + 0xa4]
movzx ecx, word [ecx + 6]
shr eax, 0x15
neg eax
add eax, ecx
inc eax
mov word [esp + 0x46], ax
mov word [esp + 0x4a], cx
push 0
push 0
push esi
lea eax, [esp + 0x50]
push eax
push dword [esp + 0xac]
call fcn.00402270
add esp, 0x14
movsx eax, word [esp + 0x48]
movsx ecx, word [esp + 0x44]
add edi, eax
sub edi, ecx
cmp edi, ebx
jge 0x40e3a4
mov word [esp + 0x44], di
mov eax, dword [esi]
mov ecx, eax
shr ecx, 0xa
and ecx, 0x7ff
add ecx, edi
movsx edx, cx
cmp edx, ebp
jl 0x40e7b0
mov ecx, ebx
jmp 0x40e7b0