Function at 0x40b280
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x41dc
call fcn.0042e7b0
push ebx
push esi
push edi
mov eax, dword [ebp + 0x24]
mov edx, dword [ebp + 0x1c]
mov ecx, eax
imul eax, eax, 0x224
imul ecx, ecx, 0x2b430
add eax, dword [ebp + 0x20]
add edx, ecx
cmp dword [edx + 0x4210], 0
lea ecx, [edx + 0x2b228]
mov dword [esp + 0x30], ecx
lea ecx, [edx + 0x2b428]
mov dword [esp + 0x44], ecx
lea ecx, [edx + 0x4218]
mov dword [esp + 0x10], ecx
lea ecx, [edx + 0x10218]
mov dword [esp + 0x1c], ecx
lea ecx, [edx + 0x16218]
mov dword [esp + 0xc], ecx
lea ecx, [edx + 0x22218]
mov dword [esp + 0x28], ecx
lea ecx, [edx + 0x28218]
mov dword [esp + 0x24], edx
lea esi, [edx + 0x8218]
lea ebx, [edx + 0x1c218]
mov dword [esp + 0x2c], ecx
lea edi, [edx + 0x2a218]
mov dword [esp + 0x40], eax
je 0x40b322
cmp dword [ebp + 0x10], 2
je 0x40b322
mov eax, 1
jmp 0x40b324
xor eax, eax
mov dword [edx + 0x4210], eax
test eax, eax
jne 0x40b340
mov eax, 1
mov ecx, 0x400
rep stosd dword es:[edi], eax
mov dword [edx + 0x4210], eax
cmp dword [ebp + 0x10], 2
jne 0x40b385
mov eax, dword [esp + 0x40]
mov dword [edx + 0x2b224], 0
cmp dword [eax + 8], 0
je 0x40bd92
inc dword [edx + 0x2b218]
cmp dword [edx + 0x2b218], 0xf8
jl 0x40bd92
mov dword [edx + 0x2b218], 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [esp + 0x1c]
fld qword [0x44a808]
mov ecx, dword [esp + 0x28]
fld qword [0x44a950]
mov edx, esi
fld qword [0x44a948]
sub edx, dword [esp + 0xc]
lea eax, [ebx + 0x2000]
mov dword [esp + 0x38], edx
mov edx, edi
sub edx, esi
mov dword [esp + 0x34], edx
mov edx, edi
mov edi, dword [esp + 0xc]
sub edx, ebx
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x28]
sub edx, ebx
mov dword [esp + 0x1c], edx
mov edx, esi
sub edx, ebx
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x10]
sub edx, ebx
mov dword [esp + 0x20], edx
mov edx, dword [ebp + 0xc]
sub edx, esi
sub edi, ebx
mov ebx, dword [esp + 0x2c]
mov dword [esp + 0x3c], edx
mov edx, dword [esp + 0xc]
add ecx, 0x4000
sub ebx, esi
sub edx, esi
mov dword [esp + 0x14], ecx
mov ecx, esi
mov dword [esp + 0x48], eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 0x400
jmp 0x40b41c
mov ebx, dword [esp + 0x2c]
mov edx, dword [esp + 0x3c]
fld qword [edx + ecx]
mov edx, dword [esp + 0x10]
fadd qword [ebx + ecx]
mov ebx, dword [esp + 0x18]
add edx, ecx
add eax, 8
fstp qword [ecx]
add ecx, 8
fld qword [edx]
fmul qword [ebx + eax - 8]
mov ebx, dword [esp + 0x28]
fsubr qword [ecx - 8]
fst qword [ebx + eax - 8]
mov ebx, dword [esp + 0x34]
fld qword [ecx + ebx + 0x3ff8]
mov ebx, dword [esp + 0x38]
fmul qword [edi + eax - 8]
fsubp st(1)
fstp qword [ecx + 0x3ff8]
fld qword [edx + ebx]
mov ebx, dword [esp + 0x18]
fmul qword [ebx + eax - 8]
mov ebx, dword [esp + 0x20]
fstp qword [ebx + eax - 8]
mov ebx, dword [esp + 0x1c]
fld qword [edx]
fld qword [ecx - 8]
fld st(1)
fmulp st(2)
fmul st(0), st(0)
faddp st(1)
fmul st(3)
fld qword [eax - 8]
fmul st(3)
faddp st(1)
fstp qword [eax - 8]
fld qword [ecx - 8]
fmul qword [edx]
fld qword [ebx + eax - 8]
fmul st(3)
faddp st(1)
fstp qword [ebx + eax - 8]
mov ebx, dword [esp + 0x28]
fld qword [edi + eax - 8]
fld qword [ebx + eax - 8]
fld st(1)
fmulp st(2)
fmul st(0), st(0)
faddp st(1)
fmul st(3)
fld qword [eax + 0x1ff8]
fmul st(3)
faddp st(1)
fstp qword [eax + 0x1ff8]
fld qword [edi + eax - 8]
fmul qword [ebx + eax - 8]
mov ebx, dword [esp + 0x14]
fld qword [ebx]
add dword [esp + 0x14], 8
sub dword [esp + 0xc], 1
fmul st(3)
faddp st(1)
fstp qword [ebx]
mov ebx, dword [esp + 0x20]
fld qword [edx]
fsub qword [ebx + eax - 8]
fmul st(1)
fstp qword [edi + eax - 8]
fld qword [ecx - 8]
fmul st(1)
fstp qword [edx]
jne 0x40b418
fstp st(1)
xor eax, eax
fstp st(1)
mov dword [esp + 0xc], eax
fldz
mov dword [esp + 0x14], esi
fld1
jmp 0x40b51c
fxch st(1)
mov ecx, dword [esp + 0x24]
add ecx, 0x2a218
cmp dword [ecx + eax*4], 0
je 0x40b599
mov edi, dword [esp + 0x24]
mov eax, dword [esp + 0x14]
lea ecx, [edi + 0x1c218]
lea edx, [edi + 0x22218]
add edi, 0x4218
sub ecx, esi
sub edx, esi
sub edi, esi
mov dword [esp + 0x20], 3
jmp 0x40b558
fxch st(1)
mov ebx, dword [esp + 0x34]
fxch st(1)
fst qword [ebx + eax]
mov ebx, dword [esp + 0x10]
fst qword [eax]
add eax, 0x2000
sub dword [esp + 0x20], 1
fst qword [ebx + eax - 0x2000]
fxch st(1)
fst qword [ecx + eax - 0x2000]
fxch st(1)
fst qword [edx + eax - 0x2000]
fst qword [edi + eax - 0x2000]
jne 0x40b556
mov eax, dword [esp + 0xc]
jmp 0x40b59b
fxch st(1)
add dword [esp + 0x14], 8
inc eax
cmp eax, 0x400
mov dword [esp + 0xc], eax
jl 0x40b51a
mov edi, dword [esp + 0x48]
fstp st(1)
fld qword [0x44a940]
mov ebx, dword [esp + 0x18]
mov esi, 3
mov dword [esp + 0x10], 0x400
mov ecx, edi
mov edx, 2
fcom qword [ecx]
fnstsw ax
test ah, 5
jp 0x40b5ed
mov eax, dword [esp + 0x1c]
fld qword [eax + ecx]
fdiv qword [ecx]
fmul st(3)
fstp qword [ebx + ecx]
jmp 0x40b5f4
fxch st(1)
fst qword [ebx + ecx]
fxch st(1)
add ecx, 0x2000
sub edx, 1
jne 0x40b5d4
add edi, 8
sub dword [esp + 0x10], 1
jne 0x40b5cd
mov edx, dword [esp + 0x24]
fstp st(0)
fstp st(1)
xor eax, eax
lea ebx, [edx + 0x18218]
lea ecx, [edx + 0x14218]
fst qword [edx + eax*8 + 0x28218]
lea edi, [edx + 0x28218]
fld qword [ecx - 0x2000]
inc eax
fmul qword [ebx - 0x2000]
add ecx, 8
add ebx, 8
cmp eax, 0x400
fadd qword [edi + eax*8 - 8]
fst qword [edi + eax*8 - 8]
fld qword [ecx - 8]
fmul qword [ebx - 8]
faddp st(1)
fstp qword [edi + eax*8 - 8]
jl 0x40b61f
mov eax, dword [esp + 0x40]
cmp dword [eax + 0x14], 0
je 0x40b7dd
cmp dword [eax + 8], 0
jne 0x40b7dd
mov eax, dword [eax + 0xc]
mov ebx, dword [ebp + 0x20]
mov ecx, eax
imul ecx, ecx, 0x224
cmp dword [ecx + ebx + 0x10], 0
mov dword [esp + 0x10], eax
je 0x40b7dd
imul eax, eax, 0x2b430
add eax, dword [ebp + 0x1c]
mov edi, 0x80
mov ecx, dword [eax + 0x2b224]
mov dword [edx + 0x2b224], ecx
mov ecx, dword [eax + 0x2b428]
mov dword [edx + 0x2b428], ecx
lea ecx, [edx + 0x2b228]
sub eax, edx
mov ebx, dword [eax + ecx]
mov dword [ecx], ebx
add ecx, 4
sub edi, 1
jne 0x40b6bd
mov ebx, dword [ebp + 0x14]
xor ecx, ecx
test ebx, ebx
jle 0x40b713
mov eax, dword [ebp + 0x18]
mov edi, dword [esp + 0x30]
sub edi, eax
mov dword [esp + 0x18], edi
mov edi, dword [esp + 0x18]
cmp dword [edi + eax], 0
jne 0x40b706
mov edi, dword [eax]
add edi, ecx
cmp ecx, edi
mov esi, ecx
jge 0x40b706
lea edi, [edx + 0x28218]
fst qword [edi + esi*8]
mov edi, dword [eax]
inc esi
add edi, ecx
cmp esi, edi
jl 0x40b6f4
add ecx, dword [eax]
add eax, 4
sub ebx, 1
jne 0x40b6e0
mov ebx, dword [ebp + 0x14]
cmp esi, 0x400
fstp st(0)
jge 0x40b739
mov ecx, 0x400
sub ecx, esi
add ecx, ecx
lea eax, [edx + 0x28218]
lea edi, [eax + esi*8]
and ecx, 0x3ffffffe
xor eax, eax
rep stosd dword es:[edi], eax
cmp ebx, 0x31
jge 0x40b750
mov eax, dword [esp + 0x30]
mov ecx, 0x31
lea edi, [eax + ebx*4]
sub ecx, ebx
xor eax, eax
rep stosd dword es:[edi], eax
cmp dword [edx + 0x2b224], 0
jne 0x40b768
mov ecx, 0x800
xor eax, eax
lea edi, [edx + 0x28218]
rep stosd dword es:[edi], eax
mov esi, dword [ebp + 8]
add edx, 0x28218
lea ecx, [edx + 0x18]
lea eax, [esi + 8]
sub edx, esi
mov esi, 0x80
mov edi, edi
fld qword [eax - 8]
add eax, 0x40
fsub qword [ecx - 0x18]
add ecx, 0x40
sub esi, 1
fstp qword [eax - 0x48]
fld qword [eax - 0x40]
fsub qword [edx + eax - 0x40]
fstp qword [eax - 0x40]
fld qword [eax - 0x38]
fsub qword [ecx - 0x48]
fstp qword [eax - 0x38]
fld qword [eax - 0x30]
fsub qword [ecx - 0x40]
fstp qword [eax - 0x30]
fld qword [eax - 0x28]
fsub qword [ecx - 0x38]
fstp qword [eax - 0x28]
fld qword [eax - 0x20]
fsub qword [ecx - 0x30]
fstp qword [eax - 0x20]
fld qword [eax - 0x18]
fsub qword [ecx - 0x28]
fstp qword [eax - 0x18]
fld qword [eax - 0x10]
fsub qword [ecx - 0x20]
fstp qword [eax - 0x10]
jne 0x40b780
mov ebx, dword [esp + 0x24]
jmp 0x40bc74
mov ecx, dword [ebp + 8]
lea ebx, [esp + 0x21e8]
sub ebx, ecx
mov dword [esp + 0x48], ebx
lea ebx, [esp + 0x1f0]
sub ebx, ecx
mov dword [esp + 0x38], ebx
lea ebx, [esp + 0x21f0]
sub ebx, ecx
mov dword [esp + 0x3c], ebx
lea ebx, [esp + 0x1f8]
sub ebx, ecx
mov dword [esp + 0x2c], ebx
lea ebx, [esp + 0x21f8]
sub ebx, ecx
mov dword [esp + 0x34], ebx
lea ebx, [esp + 0x200]
sub ebx, ecx
mov dword [esp + 0x20], ebx
lea ebx, [esp + 0x2200]
sub ebx, ecx
mov dword [esp + 0x28], ebx
lea ebx, [esp + 0x208]
sub ebx, ecx
mov dword [esp + 0x18], ebx
lea ebx, [esp + 0x2208]
sub ebx, ecx
mov dword [esp + 0x14], ebx
lea ebx, [esp + 0x210]
sub ebx, ecx
mov dword [esp + 0xc], ebx
lea ebx, [esp + 0x2210]
sub ebx, ecx
mov dword [esp + 0x54], ebx
lea edx, [edi + 0x18]
sub edi, ecx
lea ebx, [esp + 0x218]
sub ebx, ecx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x1c], edi
lea ebx, [esp + 0x2218]
lea eax, [ecx + 8]
lea edi, [esp + 0x1e8]
sub ebx, ecx
sub edi, ecx
mov dword [esp + 0x58], edx
mov dword [esp + 0x50], eax
mov dword [esp + 0x5c], ebx
xor ecx, ecx
fld qword [eax - 8]
mov ebx, dword [esp + 0x1c]
fmul st(0), st(0)
add ecx, 0x40
add eax, 0x40
add edx, 0x40
cmp ecx, 0x2000
fstp qword [esp + ecx + 0x1a8]
fld qword [eax - 0x48]
fsub qword [edx - 0x58]
fmul st(0), st(0)
fstp qword [esp + ecx + 0x21a8]
fld qword [eax - 0x40]
fmul st(0), st(0)
fstp qword [edi + eax - 0x40]
fld qword [eax - 0x40]
fsub qword [eax + ebx - 0x40]
mov ebx, dword [esp + 0x48]
fmul st(0), st(0)
fstp qword [ebx + eax - 0x40]
mov ebx, dword [esp + 0x38]
fld qword [eax - 0x38]
fmul st(0), st(0)
fstp qword [ebx + eax - 0x40]
mov ebx, dword [esp + 0x3c]
fld qword [eax - 0x38]
fsub qword [edx - 0x48]
fmul st(0), st(0)
fstp qword [ebx + eax - 0x40]
mov ebx, dword [esp + 0x2c]
fld qword [eax - 0x30]
fmul st(0), st(0)
fstp qword [ebx + eax - 0x40]
mov ebx, dword [esp + 0x34]
fld qword [eax - 0x30]
fsub qword [edx - 0x40]
fmul st(0), st(0)
fstp qword [ebx + eax - 0x40]
mov ebx, dword [esp + 0x20]
fld qword [eax - 0x28]
fmul st(0), st(0)
fstp qword [ebx + eax - 0x40]
mov ebx, dword [esp + 0x28]
fld qword [eax - 0x28]
fsub qword [edx - 0x38]
fmul st(0), st(0)
fstp qword [ebx + eax - 0x40]
mov ebx, dword [esp + 0x18]
fld qword [eax - 0x20]
fmul st(0), st(0)
fstp qword [ebx + eax - 0x40]
mov ebx, dword [esp + 0x14]
fld qword [eax - 0x20]
fsub qword [edx - 0x30]
fmul st(0), st(0)
fstp qword [ebx + eax - 0x40]
mov ebx, dword [esp + 0xc]
fld qword [eax - 0x18]
fmul st(0), st(0)
fstp qword [ebx + eax - 0x40]
mov ebx, dword [esp + 0x54]
fld qword [eax - 0x18]
fsub qword [edx - 0x28]
fmul st(0), st(0)
fstp qword [ebx + eax - 0x40]
mov ebx, dword [esp + 0x4c]
fld qword [eax - 0x10]
fmul st(0), st(0)
fstp qword [ebx + eax - 0x40]
mov ebx, dword [esp + 0x5c]
fld qword [eax - 0x10]
fsub qword [edx - 0x20]
fmul st(0), st(0)
fstp qword [ebx + eax - 0x40]
jl 0x40b8a8
xor edi, edi
cmp dword [ebp + 0x14], edi
mov dword [esp + 0xc], edi
jle 0x40bae3
mov ebx, dword [ebp + 0x18]
fld qword [0x44a930]
mov edx, dword [esp + 0x30]
sub edx, ebx
mov dword [esp + 0x18], edx
jmp 0x40b9ca
fxch st(1)
mov dword [edx + ebx], 1
fld st(1)
mov eax, dword [ebx]
fld st(2)
add eax, edi
mov ecx, eax
sub ecx, edi
cmp ecx, 4
mov esi, edi
jl 0x40ba2e
lea ecx, [eax - 3]
fld qword [esp + esi*8 + 0x1e8]
add esi, 4
cmp esi, ecx
faddp st(2)
fxch st(1)
fadd qword [esp + esi*8 + 0x1d0]
fadd qword [esp + esi*8 + 0x1d8]
fadd qword [esp + esi*8 + 0x1e0]
fld qword [esp + esi*8 + 0x21c8]
faddp st(2)
fxch st(1)
fadd qword [esp + esi*8 + 0x21d0]
fadd qword [esp + esi*8 + 0x21d8]
fadd qword [esp + esi*8 + 0x21e0]
jl 0x40b9e7
cmp esi, eax
jge 0x40ba47
fld qword [esp + esi*8 + 0x1e8]
inc esi
cmp esi, eax
faddp st(2)
fadd qword [esp + esi*8 + 0x21e0]
jl 0x40ba32
fcom st(2)
fnstsw ax
test ah, 5
jp 0x40ba54
fstp st(0)
fld st(1)
fld st(3)
fucomp st(2)
fnstsw ax
test ah, 0x44
jnp 0x40ba86
fstp st(3)
fstp st(1)
fdivp st(1)
call fcn.0042eb50
fmul qword [0x44a938]
mov edx, dword [esp + 0xc]
fstp qword [esp + edx*8 + 0x60]
mov edx, dword [esp + 0x18]
fld qword [0x44a930]
fldz
jmp 0x40ba94
mov eax, dword [esp + 0xc]
fstp st(0)
fstp st(0)
fxch st(1)
fst qword [esp + eax*8 + 0x60]
mov ecx, dword [esp + 0xc]
fcom qword [esp + ecx*8 + 0x60]
fnstsw ax
test ah, 1
jne 0x40baca
mov dword [edx + ebx], 0
mov eax, dword [ebx]
add eax, edi
cmp edi, eax
mov esi, edi
jge 0x40baca
mov ecx, dword [esp + 0x24]
lea eax, [ecx + 0x28218]
fst qword [eax + esi*8]
mov eax, dword [ebx]
inc esi
add eax, edi
cmp esi, eax
jl 0x40bab8
mov eax, dword [esp + 0xc]
add edi, dword [ebx]
inc eax
add ebx, 4
cmp eax, dword [ebp + 0x14]
mov dword [esp + 0xc], eax
jl 0x40b9c8
fstp st(1)
cmp esi, 0x400
mov ebx, dword [esp + 0x24]
jge 0x40bb0b
mov ecx, 0x400
sub ecx, esi
add ecx, ecx
lea eax, [ebx + 0x28218]
lea edi, [eax + esi*8]
and ecx, 0x3ffffffe
xor eax, eax
rep stosd dword es:[edi], eax
mov edx, dword [ebp + 0x14]
cmp edx, 0x31
jge 0x40bb25
mov ecx, dword [esp + 0x30]
lea edi, [ecx + edx*4]
mov ecx, 0x31
sub ecx, edx
xor eax, eax
rep stosd dword es:[edi], eax
xor ecx, ecx
fld st(0)
cmp edx, 4
fld qword [0x44a860]
mov edi, edx
jl 0x40bbae
mov edx, dword [ebp + 0x18]
lea esi, [edi - 3]
add edx, 8
jmp 0x40bb43
fxch st(2)
fxch st(2)
fcom qword [esp + ecx*8 + 0x60]
fnstsw ax
test ah, 5
jp 0x40bb5d
fild dword [edx - 8]
fld qword [esp + ecx*8 + 0x60]
fdiv st(4)
fmulp st(1)
faddp st(2)
fcom qword [esp + ecx*8 + 0x68]
fnstsw ax
test ah, 5
jp 0x40bb75
fild dword [edx - 4]
fld qword [esp + ecx*8 + 0x68]
fdiv st(4)
fmulp st(1)
faddp st(2)
fcom qword [esp + ecx*8 + 0x70]
fnstsw ax
test ah, 5
jp 0x40bb8a
fld qword [esp + ecx*8 + 0x70]
fdiv st(3)
fimul dword [edx]
faddp st(2)
fcom qword [esp + ecx*8 + 0x78]
fnstsw ax
test ah, 5
jp 0x40bba2
fild dword [edx + 4]
fld qword [esp + ecx*8 + 0x78]
fdiv st(4)
fmulp st(1)
faddp st(2)
add ecx, 4
add edx, 0x10
cmp ecx, esi
jl 0x40bb41
jmp 0x40bbb0
fxch st(2)
cmp ecx, edi
jge 0x40bbd4
fcom qword [esp + ecx*8 + 0x60]
fnstsw ax
test ah, 5
jp 0x40bbcf
mov edx, dword [ebp + 0x18]
fild dword [edx + ecx*4]
fld qword [esp + ecx*8 + 0x60]
fdiv st(4)
fmulp st(1)
faddp st(2)
inc ecx
cmp ecx, edi
jl 0x40bbb4
fstp st(0)
mov dword [ebx + 0x2b224], 1
fstp st(1)
fcomp qword [0x44a7a8]
fnstsw ax
test ah, 5
jp 0x40bc08
mov ecx, 0x800
xor eax, eax
lea edi, [ebx + 0x28218]
mov dword [ebx + 0x2b224], 0
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x58]
mov eax, dword [esp + 0x50]
mov esi, dword [esp + 0x1c]
mov edx, 0x80
lea esp, [esp]
fld qword [eax - 8]
add eax, 0x40
fsub qword [ecx - 0x18]
add ecx, 0x40
sub edx, 1
fstp qword [eax - 0x48]
fld qword [eax - 0x40]
fsub qword [eax + esi - 0x40]
fstp qword [eax - 0x40]
fld qword [eax - 0x38]
fsub qword [ecx - 0x48]
fstp qword [eax - 0x38]
fld qword [eax - 0x30]
fsub qword [ecx - 0x40]
fstp qword [eax - 0x30]
fld qword [eax - 0x28]
fsub qword [ecx - 0x38]
fstp qword [eax - 0x28]
fld qword [eax - 0x20]
fsub qword [ecx - 0x30]
fstp qword [eax - 0x20]
fld qword [eax - 0x18]
fsub qword [ecx - 0x28]
fstp qword [eax - 0x18]
fld qword [eax - 0x10]
fsub qword [ecx - 0x20]
fstp qword [eax - 0x10]
jne 0x40bc20
mov ecx, dword [esp + 0x40]
cmp dword [ecx + 0x14], 0
mov eax, dword [esp + 0x10]
je 0x40bcf3
cmp dword [ecx + 8], 0
jne 0x40bcf3
mov ecx, dword [ebp + 0x1c]
imul eax, eax, 0x2b430
lea edx, [eax + ecx + 0x2b218]
xor eax, eax
lea esi, [ebx + 0x2a218]
mov ecx, 0x400
mov edi, esi
rep stosd dword es:[edi], eax
mov eax, dword [edx]
mov ecx, dword [esp + 0x44]
mov edx, eax
and edx, 0x80000007
jns 0x40bcbe
dec edx
or edx, 0xfffffff8
inc edx
jne 0x40bd63
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [ecx], eax
dec eax
cmp eax, 0x400
jge 0x40bd69
jmp 0x40bce0
mov dword [esi + eax*4], 1
add eax, 0x1e
cmp eax, 0x400
jl 0x40bce0
jmp 0x40bd69
inc dword [ebx + 0x2b218]
lea esi, [ebx + 0x2a218]
xor eax, eax
mov ecx, 0x400
mov edi, esi
rep stosd dword es:[edi], eax
cmp dword [ebx + 0x2b218], 0xf8
jl 0x40bd20
mov dword [ebx + 0x2b218], 8
mov eax, dword [ebx + 0x2b218]
mov ecx, eax
and ecx, 0x80000007
jns 0x40bd35
dec ecx
or ecx, 0xfffffff8
inc ecx
mov ecx, dword [esp + 0x44]
jne 0x40bd63
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [ecx], eax
dec eax
cmp eax, 0x400
jge 0x40bd69
mov edi, edi
mov dword [esi + eax*4], 1
add eax, 0x1e
cmp eax, 0x400
jl 0x40bd50
jmp 0x40bd69
mov dword [ecx], 0xffffffff
cmp dword [ecx], 0xffffffff
je 0x40bd92
cmp dword [ebx + 0x2b224], 0
jne 0x40bd92
cmp dword [ebp + 0x14], 0
mov dword [ebx + 0x2b224], 1
jle 0x40bd92
mov ecx, dword [ebp + 0x14]
mov edi, dword [esp + 0x30]
xor eax, eax
rep stosd dword es:[edi], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret